Title: [89610] trunk/Tools
Revision
89610
Author
[email protected]
Date
2011-06-23 13:29:56 -0700 (Thu, 23 Jun 2011)

Log Message

Record whether old-run-webkit-tests aborted early in results.html

Fixes <http://webkit.org/b/63280> results.html gives no indication of whether
old-run-webkit-tests stopped running tests early

Reviewed by David Kilzer.

* Scripts/old-run-webkit-tests:
(top level): Switched to heredoc syntax for printing the start of results.html for clarity.
Added a <style> element with some styles for the new message. If we stopped running early,
put the reason why at the top of results.html.
(stopRunningTestsEarlyIfNeeded): Store the message we print in the new
$stoppedRunningEarlyMessage global.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (89609 => 89610)


--- trunk/Tools/ChangeLog	2011-06-23 20:24:55 UTC (rev 89609)
+++ trunk/Tools/ChangeLog	2011-06-23 20:29:56 UTC (rev 89610)
@@ -1,5 +1,21 @@
 2011-06-23  Adam Roben  <[email protected]>
 
+        Record whether old-run-webkit-tests aborted early in results.html
+
+        Fixes <http://webkit.org/b/63280> results.html gives no indication of whether
+        old-run-webkit-tests stopped running tests early
+
+        Reviewed by David Kilzer.
+
+        * Scripts/old-run-webkit-tests:
+        (top level): Switched to heredoc syntax for printing the start of results.html for clarity.
+        Added a <style> element with some styles for the new message. If we stopped running early,
+        put the reason why at the top of results.html.
+        (stopRunningTestsEarlyIfNeeded): Store the message we print in the new
+        $stoppedRunningEarlyMessage global.
+
+2011-06-23  Adam Roben  <[email protected]>
+
         Cache some of the TestFailures page's data in localStorage
 
         This makes reloading TestFailures much faster. Right now we only store the number of failing

Modified: trunk/Tools/Scripts/old-run-webkit-tests (89609 => 89610)


--- trunk/Tools/Scripts/old-run-webkit-tests	2011-06-23 20:24:55 UTC (rev 89609)
+++ trunk/Tools/Scripts/old-run-webkit-tests	2011-06-23 20:29:56 UTC (rev 89610)
@@ -643,6 +643,7 @@
 my $count = 0;
 my $leaksOutputFileNumber = 1;
 my $totalLeaks = 0;
+my $stoppedRunningEarlyMessage;
 
 my @toolArgs = ();
 push @toolArgs, "--pixel-tests" if $pixelTests;
@@ -1155,16 +1156,28 @@
 mkpath $testResultsDirectory;
 
 open HTML, ">", $testResults or die "Failed to open $testResults. $!";
-print HTML "<html>\n";
-print HTML "<head>\n";
-print HTML "<title>Layout Test Results</title>\n";
-print HTML "</head>\n";
-print HTML "<body>\n";
+print HTML <<EOF;
+<html>
+<head>
+<title>Layout Test Results</title>
+<style>
+.stopped-running-early-message {
+    border: 3px solid #d00;
+    font-weight: bold;
+}
+</style>
+</head>
+</body>
+EOF
 
 if ($ignoreMetrics) {
     print HTML "<h4>Tested with metrics ignored.</h4>";
 }
 
+if ($stoppedRunningEarlyMessage) {
+    print HTML "<p class='stopped-running-early-message'>$stoppedRunningEarlyMessage</p>";
+}
+
 print HTML htmlForResultsSection(@{$tests{mismatch}}, "Tests where results did not match expected results", \&linksForMismatchTest);
 print HTML htmlForResultsSection(@{$tests{timedout}}, "Tests that timed out", \&linksForErrorTest);
 print HTML htmlForResultsSection(@{$tests{crash}}, "Tests that caused the DumpRenderTree tool to crash", \&linksForErrorTest);
@@ -2623,7 +2636,8 @@
     my $newCount = $counts{new} || 0;
     my $failureCount = $count - $passCount - $newCount; # "Failure" here includes timeouts, crashes, etc.
     if ($exitAfterNFailures && $failureCount >= $exitAfterNFailures) {
-        print "\nExiting early after $failureCount failures. $count tests run.";
+        $stoppedRunningEarlyMessage = "Exiting early after $failureCount failures. $count tests run.";
+        print "\n", $stoppedRunningEarlyMessage;
         closeDumpTool();
         return 1;
     }
@@ -2632,7 +2646,8 @@
     my $webProcessCrashCount = $counts{webProcessCrash} || 0;
     my $timeoutCount = $counts{timedout} || 0;
     if ($exitAfterNCrashesOrTimeouts && $crashCount + $webProcessCrashCount + $timeoutCount >= $exitAfterNCrashesOrTimeouts) {
-        print "\nExiting early after $crashCount crashes, $webProcessCrashCount web process crashes, and $timeoutCount timeouts. $count tests run.";
+        $stoppedRunningEarlyMessage = "Exiting early after $crashCount crashes, $webProcessCrashCount web process crashes, and $timeoutCount timeouts. $count tests run.";
+        print "\n", $stoppedRunningEarlyMessage;
         closeDumpTool();
         return 1;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to