helly Sun Dec 18 14:50:33 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src run-tests.php
Log:
- MFH End test script when detecting '===DONE===' that way showing memleaks
http://cvs.php.net/viewcvs.cgi/php-src/run-tests.php?r1=1.226.2.15&r2=1.226.2.16&diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.15 php-src/run-tests.php:1.226.2.16
--- php-src/run-tests.php:1.226.2.15 Sun Dec 18 12:08:18 2005
+++ php-src/run-tests.php Sun Dec 18 14:50:33 2005
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: run-tests.php,v 1.226.2.15 2005/12/18 12:08:18 helly Exp $ */
+/* $Id: run-tests.php,v 1.226.2.16 2005/12/18 14:50:33 helly Exp $ */
/* Sanity check to ensure that pcre extension needed by this script is
available.
* In the event it is not, print a nice error message indicating that this
script will
@@ -333,7 +333,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
- echo "$Revision: 1.226.2.15 $\n";
+ echo "$Revision: 1.226.2.16 $\n";
exit(1);
default:
echo "Illegal switch '$switch'
specified!\n";
@@ -412,7 +412,7 @@
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_sort($a, $b)
{
global $cwd;
-
+
$a = test_name($a);
$b = test_name($b);
@@ -663,7 +663,7 @@
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 @@
$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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php