summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-07-04 10:15:47 +0000
committerDmitry Stogov <dmitry@php.net>2007-07-04 10:15:47 +0000
commitf3ca1b5170ee22448169bc945901e6bfb9e88bc1 (patch)
treec4acf1e4a7d9e9e9f420a7a95c47b4916def99ad
parent2f4713a9a981cd0207b44b7067367e516e73ebf0 (diff)
downloadphp-git-f3ca1b5170ee22448169bc945901e6bfb9e88bc1.tar.gz
Fixed "make test"
-rw-r--r--Makefile.global18
-rwxr-xr-xrun-tests.php4
2 files changed, 16 insertions, 6 deletions
diff --git a/Makefile.global b/Makefile.global
index d66da7c27c..401b1b9969 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -98,22 +98,32 @@ test: all
utest: all
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
- $(EGREP) -v '^extension[\t\ ]=' `$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo (php_ini_loaded_file()) ? php_ini_loaded_file() : "no_ini_file";'` > $(top_builddir)/tmp-php.ini; \
+ INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
+ if test "$$INI_FILE"; then \
+ $(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
+ else \
+ echo > $(top_builddir)/tmp-php.ini; \
+ fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
- $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -u -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
+ $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -u -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
ntest: all
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
- $(EGREP) -v '^extension[\t\ ]=' `$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo (php_ini_loaded_file()) ? php_ini_loaded_file() : "no_ini_file";'` > $(top_builddir)/tmp-php.ini; \
+ INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
+ if test "$$INI_FILE"; then \
+ $(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
+ else \
+ echo > $(top_builddir)/tmp-php.ini; \
+ fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
- $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -N -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
+ $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -N -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
diff --git a/run-tests.php b/run-tests.php
index 37301870b1..0ef93b14b0 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1231,7 +1231,7 @@ TEST $file
$env['USE_ZEND_ALLOC'] = '1';
}
- $output = system_with_timeout("$extra $php -q $ini_settings $test_skipif", $env);
+ $output = system_with_timeout("$extra $php $pass_options -q $ini_settings $test_skipif", $env);
if (!$cfg['keep']['skip']) {
@unlink($test_skipif);
}
@@ -1462,7 +1462,7 @@ COMMAND $cmd
settings2params($clean_params);
$extra = substr(PHP_OS, 0, 3) !== "WIN" ?
"unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": "";
- system_with_timeout("$extra $php -q $clean_params $test_clean", $env);
+ system_with_timeout("$extra $php $pass_options -q $clean_params $test_clean", $env);
}
if (!$cfg['keep']['clean']) {
@unlink($test_clean);