diff options
| author | Marcus Boerger <helly@php.net> | 2005-12-18 14:50:33 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2005-12-18 14:50:33 +0000 |
| commit | 2b413f7af263ecb911e0c12e75baf66e141a8399 (patch) | |
| tree | 6d9d09d894f418a9f5f5685cf1bdc596b065ad36 /run-tests.php | |
| parent | 6654b31e26ff1187d6b1b49a2b027034a245e691 (diff) | |
| download | php-git-2b413f7af263ecb911e0c12e75baf66e141a8399.tar.gz | |
- MFH End test script when detecting '===DONE===' that way showing memleaks
Diffstat (limited to 'run-tests.php')
| -rwxr-xr-x | run-tests.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/run-tests.php b/run-tests.php index 4c9bf0d1a7..6408500bae 100755 --- a/run-tests.php +++ b/run-tests.php @@ -412,7 +412,7 @@ HELP; usort($test_files, "test_sort"); $start_time = time(); if (!$html_output) { - echo "Running selected tests.\n"; + echo "Running selected tests.\n"; } else { show_start($start_time); } @@ -518,7 +518,7 @@ function test_name($name) function test_sort($a, $b) { global $cwd; - + $a = test_name($a); $b = test_name($b); @@ -663,7 +663,7 @@ if ($just_save_results || !getenv('NO_INTERACTION')) { file_put_contents($output_file, $failed_tests_data); if (!$just_save_results) { - echo "\nThe test script was unable to automatically send the report to PHP's QA Team\n"; + echo "\nThe test script was unable to automatically send the report to PHP's QA Team\n"; } echo "Please send ".$output_file." to ".PHP_QA_EMAIL." manually, thank you.\n"; @@ -867,18 +867,29 @@ TEST $file $borked = true; } $section = 'TEST'; + $secfile = false; + $secdone = false; while (!feof($fp)) { $line = fgets($fp); // Match the beginning of a section. - if (preg_match('/^--([A-Z]+)--/',$line,$r)) { + if (preg_match('/^--([A-Z]+)--/', $line, $r)) { $section = $r[1]; $section_text[$section] = ''; + $secfile = $section == 'FILE' || $section == 'FILEEOF'; + $secdone = false; continue; } // Add to the section text. - $section_text[$section] .= $line; + if (!$secdone) { + $section_text[$section] .= $line; + } + + // End of actual test? + if ($secfile && preg_match('/^===DONE===/', $line, $r)) { + $secdone = true; + } } // the redirect section allows a set of tests to be reused outside of |
