diff options
Diffstat (limited to 'Tools/Scripts/old-run-webkit-tests')
-rwxr-xr-x | Tools/Scripts/old-run-webkit-tests | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/Tools/Scripts/old-run-webkit-tests b/Tools/Scripts/old-run-webkit-tests index ab41e9b..892b5a4 100755 --- a/Tools/Scripts/old-run-webkit-tests +++ b/Tools/Scripts/old-run-webkit-tests @@ -113,7 +113,7 @@ sub splitpath($); sub stopRunningTestsEarlyIfNeeded(); sub stripExtension($); sub stripMetrics($$); -sub testCrashedOrTimedOut($$$$$); +sub testCrashedOrTimedOut($$$$$$); sub toCygwinPath($); sub toURL($); sub toWindowsPath($); @@ -170,6 +170,7 @@ my $useValgrind = 0; my $verbose = 0; my $shouldWaitForHTTPD = 0; my $useWebKitTestRunner = 0; +my $noBuildDumpTool = 0; my @leaksFilenames; @@ -329,6 +330,7 @@ my $getOptionsResult = GetOptions( 'leaks|l' => \$shouldCheckLeaks, 'merge-leak-depth|m:5' => \$mergeDepth, 'new-test-results!' => \$generateNewResults, + 'no-build' => \$noBuildDumpTool, 'nthly=i' => \$testsPerDumpTool, 'pixel-tests|p' => \$pixelTests, 'platform=s' => \$platform, @@ -405,7 +407,7 @@ $productDir .= "/Programs" if isGtk(); chdirWebKit(); -if (!defined($root)) { +if (!defined($root) && !$noBuildDumpTool) { # FIXME: We build both DumpRenderTree and WebKitTestRunner for # WebKitTestRunner runs becuase DumpRenderTree still includes # the DumpRenderTreeSupport module and the TestNetscapePlugin. @@ -446,6 +448,8 @@ my @platformTestHierarchy = buildPlatformTestHierarchy(@platformResultHierarchy) $expectedDirectory = $ENV{"WebKitExpectedTestResultsDirectory"} if $ENV{"WebKitExpectedTestResultsDirectory"}; $testResultsDirectory = File::Spec->rel2abs($testResultsDirectory); +# $testResultsDirectory must be empty before testing. +rmtree $testResultsDirectory; my $testResults = File::Spec->catfile($testResultsDirectory, "results.html"); if (isAppleMacWebKit()) { @@ -804,8 +808,9 @@ for my $test (@tests) { unless ($readResults->{status} eq "success") { my $crashed = $readResults->{status} eq "crashed"; - testCrashedOrTimedOut($test, $base, $crashed, $actual, $error); - countFinishedTest($test, $base, $crashed ? "crash" : "timedout", 0); + my $webProcessCrashed = $readResults->{status} eq "webProcessCrashed"; + testCrashedOrTimedOut($test, $base, $crashed, $webProcessCrashed, $actual, $error); + countFinishedTest($test, $base, $webProcessCrashed ? "webProcessCrash" : $crashed ? "crash" : "timedout", 0); last if stopRunningTestsEarlyIfNeeded(); next; } @@ -914,7 +919,7 @@ for my $test (@tests) { if (dumpToolDidCrash()) { $result = "crash"; - testCrashedOrTimedOut($test, $base, 1, $actual, $error); + testCrashedOrTimedOut($test, $base, 1, 0, $actual, $error); } elsif (!defined $expected) { if ($verbose) { print "new " . ($resetResults ? "result" : "test"); @@ -1137,6 +1142,7 @@ if ($ignoreMetrics) { 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); +print HTML htmlForResultsSection(@{$tests{webProcessCrash}}, "Tests that caused the Web process to crash", \&linksForErrorTest); print HTML htmlForResultsSection(@{$tests{error}}, "Tests that had stderr output", \&linksForErrorTest); print HTML htmlForResultsSection(@{$tests{new}}, "Tests that had no expected results (probably new)", \&linksForNewTest); @@ -1700,13 +1706,13 @@ sub countFinishedTest($$$$) push @{$tests{$result}}, $test; } -sub testCrashedOrTimedOut($$$$$) +sub testCrashedOrTimedOut($$$$$$) { - my ($test, $base, $didCrash, $actual, $error) = @_; + my ($test, $base, $didCrash, $webProcessCrashed, $actual, $error) = @_; - printFailureMessageForTest($test, $didCrash ? "crashed" : "timed out"); + printFailureMessageForTest($test, $webProcessCrashed ? "Web process crashed" : $didCrash ? "crashed" : "timed out"); - sampleDumpTool() unless $didCrash; + sampleDumpTool() unless $didCrash || $webProcessCrashed; my $dir = dirname(File::Spec->catdir($testResultsDirectory, $base)); mkpath $dir; @@ -2155,6 +2161,10 @@ sub readFromDumpToolWithTimer(**) } } if (defined($lineError)) { + if ($lineError =~ /#CRASHED - WebProcess/) { + $status = "webProcessCrashed"; + last; + } if ($lineError =~ /#CRASHED/) { $status = "crashed"; last; @@ -2392,10 +2402,11 @@ sub printResults new => "were new", timedout => "timed out", crash => "crashed", + webProcessCrash => "Web process crashed", error => "had stderr output" ); - for my $type ("match", "mismatch", "new", "timedout", "crash", "error") { + for my $type ("match", "mismatch", "new", "timedout", "crash", "webProcessCrash", "error") { my $typeCount = $counts{$type}; next unless $typeCount; my $typeText = $text{$type}; |