mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
- MFH End test script when detecting '===DONE===' that way showing memleaks
This commit is contained in:
parent
6654b31e26
commit
2b413f7af2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user