From: Anatol Belski Date: Mon, 15 May 2017 15:43:48 +0000 (+0200) Subject: restore rev 431e22fb4d2a23f6e522ec5e20503fd6ec7ca1f6 X-Git-Tag: php-7.2.0alpha2~15^2~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b273fda8259dd9d7f04d7cb21f3161c037768852;p=php restore rev 431e22fb4d2a23f6e522ec5e20503fd6ec7ca1f6 --- diff --git a/run-tests.php b/run-tests.php index fbb664d809..09dadf6b5f 100755 --- a/run-tests.php +++ b/run-tests.php @@ -481,6 +481,7 @@ $test_results = array(); $PHP_FAILED_TESTS = array('BORKED' => array(), 'FAILED' => array(), 'WARNED' => array(), 'LEAKED' => array(), 'XFAILED' => array()); // If parameters given assume they represent selected tests to run. +$result_tests_file= false; $failed_tests_file= false; $pass_option_n = false; $pass_options = ''; @@ -580,6 +581,9 @@ if (isset($argc) && $argc > 1) { case 'a': $failed_tests_file = fopen($argv[++$i], 'a+t'); break; + case 'W': + $result_tests_file = fopen($argv[++$i], 'w+t'); + break; case 'c': $conf_passed = $argv[++$i]; break; @@ -712,6 +716,8 @@ Options: -a Same as -w but append rather then truncating . + -W Write a list of all tests and their result status to . + -c Look for php.ini in directory or use as ini. -n Pass -n option to the php binary (Do not use a php.ini). @@ -841,6 +847,10 @@ HELP; fclose($failed_tests_file); } + if ($result_tests_file) { + fclose($result_tests_file); + } + compute_summary(); if ($html_output) { fwrite($html_file, "
\n" . get_summary(false, true)); @@ -974,6 +984,10 @@ if ($failed_tests_file) { fclose($failed_tests_file); } +if ($result_tests_file) { + fclose($result_tests_file); +} + // Summarize results if (0 == count($test_results)) { @@ -1175,7 +1189,7 @@ function system_with_timeout($commandline, $env = null, $stdin = null, $captureS function run_all_tests($test_files, $env, $redir_tested = null) { - global $test_results, $failed_tests_file, $php, $test_idx; + global $test_results, $failed_tests_file, $result_tests_file, $php, $test_idx; foreach($test_files as $name) { @@ -1198,6 +1212,9 @@ function run_all_tests($test_files, $env, $redir_tested = null) if ($failed_tests_file && ($result == 'XFAILED' || $result == 'FAILED' || $result == 'WARNED' || $result == 'LEAKED')) { fwrite($failed_tests_file, "$index\n"); } + if ($result_tests_file) { + fwrite($result_tests_file, "$result\t$index\n"); + } } } }