]> granicus.if.org Git - php/commitdiff
prepend known bin folders to the path for nmake test runs
authorAnatol Belski <ab@php.net>
Thu, 27 Oct 2016 18:41:41 +0000 (20:41 +0200)
committerAnatol Belski <ab@php.net>
Thu, 27 Oct 2016 18:41:41 +0000 (20:41 +0200)
win32/build/Makefile
win32/build/confutils.js

index 33f145f2694fb9f07ad05e6bbffaa9bcdf9c2dd3..813d92a08666b710d8013906ff19da992f4c8f80 100644 (file)
@@ -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
index e4270f705a0895421de6bcfce466079c002cbb72..2481b9498cb02539f644d59e2b7aac8aab248834 100644 (file)
@@ -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();