From 1be8339891be8a60ad66b9128f13aa8c8b94c580 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 27 Oct 2016 20:41:41 +0200 Subject: [PATCH] prepend known bin folders to the path for nmake test runs --- win32/build/Makefile | 2 +- win32/build/confutils.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/win32/build/Makefile b/win32/build/Makefile index 33f145f269..813d92a086 100644 --- a/win32/build/Makefile +++ b/win32/build/Makefile @@ -151,7 +151,7 @@ clean-pgo: clean-all -del /f /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip -del /f /q $(BUILD_DIR)\php-test-pack-$(PHP_VERSION_STRING).zip -test: +test: set-test-env "$(BUILD_DIR)\php.exe" -d open_basedir= -d output_buffering=0 run-tests.php $(TESTS) -p "$(BUILD_DIR)\php.exe" build-snap: generated_files diff --git a/win32/build/confutils.js b/win32/build/confutils.js index e4270f705a..2481b9498c 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -2127,6 +2127,21 @@ function generate_makefile() } TF.Close(); + MF.WriteBlankLines(1); + + var extra_path = PHP_PHP_BUILD + "\\bin"; + if (PHP_EXTRA_LIBS.length) { + path = PHP_EXTRA_LIBS.split(';'); + for (i = 0; i < path.length; i++) { + f = FSO.GetAbsolutePathName(path[i] + "\\..\\bin"); + if (FSO.FolderExists(f)) { + extra_path = extra_path + ";" + f; + } + } + } + MF.WriteLine("set-test-env:"); + MF.WriteLine(" @set PATH=" + extra_path + ";%PATH%"); + MF.WriteBlankLines(2); MFO.Close(); -- 2.50.0