]> granicus.if.org Git - php/commitdiff
Enable 'nmake test' on building extensions
authory-uti <y.uchiyama.1015@gmail.com>
Mon, 28 Mar 2016 10:50:31 +0000 (19:50 +0900)
committerAnatol Belski <ab@php.net>
Mon, 25 Jul 2016 07:55:07 +0000 (09:55 +0200)
On Windows, Makefile generated by phpize doesn't have the 'test'
target rule. This commit fixes that and enables 'nmake test' on
Windows.

win32/build/Makefile
win32/build/Makefile.phpize
win32/build/phpize.js.in

index 224ef2ae1ec21c39616ef67902062078c87d554b..87a3e81a55f63ddfbd92684945e5773746bf4021 100644 (file)
@@ -191,6 +191,7 @@ build-lib: build-ext-libs
 build-devel: build-headers build-lib
        @if not exist $(BUILD_DIR_DEV)\script mkdir $(BUILD_DIR_DEV)\script >nul
        @if not exist $(BUILD_DIR_DEV)\build mkdir $(BUILD_DIR_DEV)\build >nul
+       @copy run-tests.php $(BUILD_DIR_DEV)\script\ /y >nul
        @copy win32\build\confutils.js $(BUILD_DIR_DEV)\script\ /y >nul
        @copy win32\build\configure.tail $(BUILD_DIR_DEV)\script\ /y >nul
        @copy win32\build\config.w32.phpize.in $(BUILD_DIR_DEV)\script\ /y >nul
index 1f92f7716c4817b0696291d26ded2dd1b77e15c3..28ad5ceb7ef6fa32e2ba928848fab5d0a62d0989 100644 (file)
@@ -26,6 +26,15 @@ clean: clean-pecl
        @for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL\r
        -@del /F /Q $(BUILD_DIR)\*.res $(BUILD_DIR)\*.lib $(BUILD_DIR)\*.ilk $(BUILD_DIR)\*.pdb $(BUILD_DIR)\*.exp $(PHPDEF) $(BUILD_DIR)\php-$(PHP_VERSION_STRING)-Win32.zip $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)-Win32.zip > NUL\r
 \r
+!if "$(EXT_TARGETS)" == ""
+_EXTENSION_DLL=$(PECL_TARGETS)
+!else
+_EXTENSION_DLL=$(EXT_TARGETS)
+!endif
+
+test:
+       "$(PHP_PREFIX)\php.exe" -d open_basedir= -d output_buffering=0 run-tests.php $(TESTS) -p "$(PHP_PREFIX)\php.exe" -d extension=$(BUILD_DIR)\$(_EXTENSION_DLL)
+
 !if $(MT) == ""\r
 _VC_MANIFEST_EMBED_EXE=\r
 _VC_MANIFEST_EMBED_DLL=\r
index c99dece6181a79002d6c9e567f1e5011b955802f..5156cd23b1898dcaf29324e4aefa1afe3e310439 100644 (file)
@@ -268,3 +268,5 @@ C.Write(file_get_contents(PHP_DIR + "\\script\\configure.tail"));
 \r
 B.WriteLine("@echo off");\r
 B.WriteLine("cscript /nologo configure.js %*");\r
+
+FSO.CopyFile(PHP_DIR + "\\script\\run-tests.php", "run-tests.php", true);