]> granicus.if.org Git - php/commitdiff
- Added the TEST_PHP_USER environment variable with which you can specify
authorDerick Rethans <derick@php.net>
Mon, 14 Oct 2002 07:18:23 +0000 (07:18 +0000)
committerDerick Rethans <derick@php.net>
Mon, 14 Oct 2002 07:18:23 +0000 (07:18 +0000)
  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

run-tests.php

index 658a4425d4fc11ab63fcb7fec3e25f76a57b40fd..b0dbb7bf86cedbe48d74971b192cd60357e13333 100755 (executable)
@@ -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;