com php-src: Enable 'nmake test' on building extensions: win32/build/Makefile win32/build/Makefile.phpize win32/build/phpize.js.in
| From: | Anatol Belski | Date: | Mon, 25 Jul 2016 07:46:06 +0000 |
| Subject: | com php-src: Enable 'nmake test' on building extensions: win32/build/Makefile win32/build/Makefile.phpize win32/build/phpize.js.in | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93377@lists.php.net to get a copy of this message | ||
Commit: 0f9bf85ad9a18a5cbd314f00030626f2d21be49e
Author: y-uti <y.uchiyama.1015@gmail.com> Mon, 28 Mar 2016 19:50:31 +0900
Committer: Anatol Belski <ab@php.net> Mon, 25 Jul 2016 09:46:06 +0200
Parents: 6ed71363714a6225a69d748d3b8ab2e565e1ea44
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0f9bf85ad9a18a5cbd314f00030626f2d21be49e
Log:
Enable 'nmake test' on building extensions
On Windows, Makefile generated by phpize doesn't have the 'test'
target rule. This commit fixes that and enables 'nmake test' on
Windows.
Changed paths:
M win32/build/Makefile
M win32/build/Makefile.phpize
M win32/build/phpize.js.in
Diff:
diff --git a/win32/build/Makefile b/win32/build/Makefile
index 06f8ef3...245643b 100644
--- a/win32/build/Makefile
+++ b/win32/build/Makefile
@@ -195,6 +195,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
diff --git a/win32/build/Makefile.phpize b/win32/build/Makefile.phpize
index cd74336..d3b89c9 100644
--- a/win32/build/Makefile.phpize
+++ b/win32/build/Makefile.phpize
@@ -28,6 +28,15 @@ clean: clean-pecl
@for %D in (_x $(BUILD_DIRS_SUB)) do @if exist %D @del /F /Q %D\*.* > NUL
-@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
+!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) == ""
_VC_MANIFEST_EMBED_EXE=
_VC_MANIFEST_EMBED_DLL=
diff --git a/win32/build/phpize.js.in b/win32/build/phpize.js.in
index e610897..f3fc8c4 100644
--- a/win32/build/phpize.js.in
+++ b/win32/build/phpize.js.in
@@ -262,3 +262,5 @@ C.Write(file_get_contents(PHP_DIR + "\\script\\configure.tail"));
B.WriteLine("@echo off");
B.WriteLine("cscript /nologo configure.js %*");
+
+FSO.CopyFile(PHP_DIR + "\\script\\run-tests.php", "run-tests.php", true);