diff options
author | Derick Rethans <derick@php.net> | 2002-10-14 07:18:23 +0000 |
---|---|---|
committer | Derick Rethans <derick@php.net> | 2002-10-14 07:18:23 +0000 |
commit | 2b34f26b33513d5b714e28edff474a287ef78de2 (patch) | |
tree | 96e2f3abc00293d5bff2a0e20750273adae8e256 | |
parent | 092f78fc2890eeac610926b5f7e4a404caf48893 (diff) | |
download | php-git-2b34f26b33513d5b714e28edff474a287ef78de2.tar.gz |
- Added the TEST_PHP_USER environment variable with which you can specify
additional directories with tests to run. This is ideal for having your own
test suite on your system. You can specify more directories by seperating them
with a ",", for example:
TEST_PHP_USER=/dat/dev/xdebug/tests,/dat/dev/srm/tests make test
-rwxr-xr-x | run-tests.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/run-tests.php b/run-tests.php index 658a4425d4..b0dbb7bf86 100755 --- a/run-tests.php +++ b/run-tests.php @@ -77,13 +77,19 @@ if (function_exists('is_executable') && !@is_executable($php)) { } // Check whether a detailed log is wanted. - if (getenv('TEST_PHP_DETAILED')) { define('DETAILED', getenv('TEST_PHP_DETAILED')); } else { define('DETAILED', 0); } +// Check whether user test dirs are requested. +if (getenv('TEST_PHP_USER')) { + $user_tests = explode (',', getenv('TEST_PHP_USER')); +} else { + $user_tests = NULL; +} + // Write test context information. echo " @@ -95,6 +101,11 @@ PHP_VERSION : " . PHP_VERSION . " PHP_OS : " . PHP_OS . " INI actual : " . realpath(get_cfg_var('cfg_file_path')) . " More .INIs : " . str_replace("\n","", php_ini_scanned_files()) . " +Extra dirs : "; +foreach ($user_tests as $test_dir) { + echo "{$test_dir}\n "; +} +echo " ===================================================================== "; @@ -140,6 +151,10 @@ foreach ($test_dirs as $dir) { find_files("{$cwd}/{$dir}", ($dir == 'ext')); } +foreach ($user_tests as $dir) { + find_files("{$dir}", ($dir == 'ext')); +} + function find_files($dir,$is_ext_dir=FALSE,$ignore=FALSE) { global $test_files, $exts_to_test, $ignored_by_ext, $exts_skipped, $exts_tested; |