From: Stefan Esser Date: Tue, 22 Oct 2002 18:53:56 +0000 (+0000) Subject: fix make test for an external build dir setup X-Git-Tag: php-4.3.0pre2~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e83ca7dc85dd26f25327c90d7c1087507bc53d36;p=php fix make test for an external build dir setup --- diff --git a/Makefile.global b/Makefile.global index c684bfe914..29e9a551ad 100644 --- a/Makefile.global +++ b/Makefile.global @@ -48,6 +48,7 @@ install-su: install-pear install-tester test: $(SAPI_CLI_PATH) @TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ + TEST_PHP_SRCDIR=$(top_srcdir) \ $(top_builddir)/$(SAPI_CLI_PATH) $(top_srcdir)/run-tests.php $(TESTS) clean: diff --git a/run-tests.php b/run-tests.php index 25dbea7b35..1483ae8604 100755 --- a/run-tests.php +++ b/run-tests.php @@ -36,6 +36,12 @@ * - do not test PEAR components if base class and/or component class cannot be instanciated */ +// change into the PHP source directory. + +if (getenv('TEST_PHP_SRCDIR')) { + @chdir(getenv('TEST_PHP_SRCDIR')); +} + $cwd = getcwd(); set_time_limit(0); ob_implicit_flush();