diff options
Diffstat (limited to 'Tools/Scripts/old-run-webkit-tests')
-rwxr-xr-x | Tools/Scripts/old-run-webkit-tests | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/Tools/Scripts/old-run-webkit-tests b/Tools/Scripts/old-run-webkit-tests index fe9bdd0..333777e 100755 --- a/Tools/Scripts/old-run-webkit-tests +++ b/Tools/Scripts/old-run-webkit-tests @@ -105,6 +105,7 @@ sub openWebSocketServerIfNeeded(); sub pathcmp($$); sub printFailureMessageForTest($$); sub processIgnoreTests($$); +sub readChecksumFromPng($); sub readFromDumpToolWithTimer(**); sub readSkippedFiles($); sub recordActualResultsAndDiff($$); @@ -125,6 +126,7 @@ sub writeToFile($$); # Argument handling my $addPlatformExceptions = 0; +my @additionalPlatformDirectories = (); my $complexText = 0; my $exitAfterNFailures = 0; my $exitAfterNCrashesOrTimeouts = 0; @@ -275,6 +277,8 @@ my $sampleDefault = $runSample ? "run" : "do not run"; my $usage = <<EOF; Usage: $programName [options] [testdir|testpath ...] --add-platform-exceptions Put new results for non-platform-specific failing tests into the platform-specific results directory + --additional-platform-directory path/to/directory + Look in the specified directory before looking in any of the default platform-specific directories --complex-text Use the complex text code path for all text (Mac OS X and Windows only) -c|--configuration config Set DumpRenderTree build configuration -g|--guard-malloc Enable malloc guard @@ -323,6 +327,7 @@ setConfiguration(); my $getOptionsResult = GetOptions( 'add-platform-exceptions' => \$addPlatformExceptions, + 'additional-platform-directory=s' => \@additionalPlatformDirectories, 'complex-text' => \$complexText, 'exit-after-n-failures=i' => \$exitAfterNFailures, 'exit-after-n-crashes-or-timeouts=i' => \$exitAfterNCrashesOrTimeouts, @@ -426,6 +431,7 @@ my $dumpToolName = $useWebKitTestRunner ? "WebKitTestRunner" : "DumpRenderTree"; if (isAppleWinWebKit()) { $dumpToolName .= "_debug" if configurationForVisualStudio() eq "Debug_All"; + $dumpToolName .= "_debug" if configurationForVisualStudio() eq "Debug_Cairo_CFLite"; $dumpToolName .= $Config{_exe}; } my $dumpTool = File::Spec->catfile($productDir, $dumpToolName); @@ -433,6 +439,7 @@ die "can't find executable $dumpToolName (looked in $productDir)\n" unless -x $d my $imageDiffTool = "$productDir/ImageDiff"; $imageDiffTool .= "_debug" if isCygwin() && configurationForVisualStudio() eq "Debug_All"; +$imageDiffTool .= "_debug" if isCygwin() && configurationForVisualStudio() eq "Debug_Cairo_CFLite"; die "can't find executable $imageDiffTool (looked in $productDir)\n" if $pixelTests && !-x $imageDiffTool; checkFrameworks() unless isCygwin(); @@ -556,6 +563,7 @@ if (!$hasAcceleratedCompositing) { $ignoredFiles{'media/controls-drag-timebar.html'} = 1; $ignoredFiles{'media/controls-strict.html'} = 1; $ignoredFiles{'media/controls-styling.html'} = 1; + $ignoredFiles{'media/controls-without-preload.html'} = 1; $ignoredFiles{'media/video-controls-rendering.html'} = 1; $ignoredFiles{'media/video-display-toggle.html'} = 1; $ignoredFiles{'media/video-no-audio.html'} = 1; @@ -599,6 +607,12 @@ if (!checkWebCoreFeatureSupport("XHTMLMP", 0)) { $ignoredDirectories{'fast/xhtmlmp'} = 1; } +if (isAppleMacWebKit() && $platform ne "mac-wk2" && osXVersion()->{minor} >= 6 && architecture() =~ /x86_64/) { + # This test relies on executing JavaScript during NPP_Destroy, which isn't supported with + # out-of-process plugins in WebKit1. See <http://webkit.org/b/58077>. + $ignoredFiles{'plugins/npp-set-window-called-during-destruction.html'} = 1; +} + processIgnoreTests(join(',', @ignoreTests), "ignore-tests") if @ignoreTests; if (!$ignoreSkipped) { if (!$skippedOnly || @ARGV == 0) { @@ -679,6 +693,9 @@ for (my $i = 1; $i < $iterations; $i++) { push(@tests, @originalTests); } +my $absTestResultsDirectory = resolveAndMakeTestResultsDirectory(); +open my $tests_run_fh, '>', "$absTestResultsDirectory/tests_run.txt" or die $!; + for my $test (@tests) { my $newDumpTool = not $isDumpToolOpen; openDumpTool(); @@ -729,6 +746,8 @@ for my $test (@tests) { my $startTime = time if $report10Slowest; + print $tests_run_fh "$testDirectory/$test\n"; + # Try to read expected hash file for pixel tests my $suffixExpectedHash = ""; if ($pixelTests && !$resetResults) { @@ -740,6 +759,8 @@ for my $test (@tests) { # Format expected hash into a suffix string that is appended to the path / URL passed to DRT $suffixExpectedHash = "'$expectedHash"; + } elsif (my $expectedHash = readChecksumFromPng(File::Spec->catfile($expectedPixelDir, "$base-$expectedTag.png"))) { + $suffixExpectedHash = "'$expectedHash"; } } @@ -1075,6 +1096,8 @@ for my $test (@tests) { last if stopRunningTestsEarlyIfNeeded(); } +close($tests_run_fh); + my $totalTestingTime = time - $overallStartTime; my $waitTime = getWaitTime(); if ($waitTime > 0.1) { @@ -1157,6 +1180,9 @@ print HTML htmlForResultsSection(@{$tests{webProcessCrash}}, "Tests that caused 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); +print HTML "<p>httpd access log: <a href=\"access_log.txt\">access_log.txt</a></p>\n"; +print HTML "<p>httpd error log: <a href=\"error_log.txt\">error_log.txt</a></p>\n"; + print HTML "</body>\n"; print HTML "</html>\n"; close HTML; @@ -1255,12 +1281,6 @@ sub countAndPrintLeaks($$$) ); } - if (isDarwin() && !isTiger() && !isLeopard() && !isSnowLeopard()) { - push @callStacksToExclude, ( - "CGGradientCreateWithColorComponents", # leak in CoreGraphics, <rdar://problem/7888492> - ); - } - my $leaksTool = sourceDir() . "/Tools/Scripts/run-leaks"; my $excludeString = "--exclude-callstack '" . (join "' --exclude-callstack '", @callStacksToExclude) . "'"; $excludeString .= " --exclude-type '" . (join "' --exclude-type '", @typesToExclude) . "'" if @typesToExclude; @@ -2112,13 +2132,13 @@ sub recordActualResultsAndDiff($$) mkpath(dirname($actualResultsPath)); writeToFile("$actualResultsPath", $actualResults); - if (-f $expectedResultPath) { - copy("$expectedResultPath", "$copiedExpectedResultsPath"); - } else { - open EMPTY, ">$copiedExpectedResultsPath"; - close EMPTY; + # We don't need diff and pretty diff for tests without expected file. + if ( !-f $expectedResultPath) { + return; } + copy("$expectedResultPath", "$copiedExpectedResultsPath"); + my $diffOuputBasePath = File::Spec->catfile($testResultsDirectory, $base); my $diffOutputPath = "$diffOuputBasePath-$diffsTag.txt"; system "diff -u \"$copiedExpectedResultsPath\" \"$actualResultsPath\" > \"$diffOutputPath\""; @@ -2165,6 +2185,8 @@ sub buildPlatformResultHierarchy() push(@hierarchy, $scoped) if (-d $scoped); } + unshift @hierarchy, grep { -d $_ } @additionalPlatformDirectories; + return @hierarchy; } @@ -2457,6 +2479,15 @@ sub readSkippedFiles($) } } +sub readChecksumFromPng($) +{ + my ($path) = @_; + my $data; + if (open(PNGFILE, $path) && read(PNGFILE, $data, 2048) && $data =~ /tEXtchecksum\0([a-fA-F0-9]{32})/) { + return $1; + } +} + my @testsFound; sub isUsedInReftest @@ -2668,10 +2699,13 @@ sub setUpWindowsCrashLogSaving() my $ntsdPath = File::Spec->catfile(toCygwinPath($ENV{PROGRAMFILES}), "Debugging Tools for Windows (x86)", "ntsd.exe"); unless (-f $ntsdPath) { - $ntsdPath = File::Spec->catfile(toCygwinPath($ENV{SYSTEMROOT}), "system32", "ntsd.exe"); + $ntsdPath = File::Spec->catfile(toCygwinPath($ENV{ProgramW6432}), "Debugging Tools for Windows (x64)", "ntsd.exe"); unless (-f $ntsdPath) { - print STDERR "Can't find ntsd.exe. Crash logs will not be saved.\nSee <http://trac.webkit.org/wiki/BuildingOnWindows#GettingCrashLogs>.\n"; - return; + $ntsdPath = File::Spec->catfile(toCygwinPath($ENV{SYSTEMROOT}), "system32", "ntsd.exe"); + unless (-f $ntsdPath) { + print STDERR "Can't find ntsd.exe. Crash logs will not be saved.\nSee <http://trac.webkit.org/wiki/BuildingOnWindows#GettingCrashLogs>.\n"; + return; + } } } |