Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ function save_or_mail_results()
$PHP_FAILED_TESTS = array('BORKED' => array(), 'FAILED' => array(), 'WARNED' => array(), 'LEAKED' => array(), 'XFAILED' => array(), 'SLOW' => 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 = '';
Expand Down Expand Up @@ -559,6 +560,9 @@ function save_or_mail_results()
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;
Expand Down Expand Up @@ -694,6 +698,8 @@ function save_or_mail_results()

-a <file> Same as -w but append rather then truncating <file>.

-W <file> Write a list of all tests and their result status to <file>.

-c <file> Look for php.ini in directory <file> or use <file> as ini.

-n Pass -n option to the php binary (Do not use a php.ini).
Expand Down Expand Up @@ -826,6 +832,10 @@ function save_or_mail_results()
fclose($failed_tests_file);
}

if ($result_tests_file) {
fclose($result_tests_file);
}

compute_summary();
if ($html_output) {
fwrite($html_file, "<hr/>\n" . get_summary(false, true));
Expand Down Expand Up @@ -959,6 +969,10 @@ function test_sort($a, $b)
fclose($failed_tests_file);
}

if ($result_tests_file) {
fclose($result_tests_file);
}

// Summarize results

if (0 == count($test_results)) {
Expand Down Expand Up @@ -1160,7 +1174,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) {

Expand All @@ -1183,6 +1197,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");
}
}
}
}
Expand Down