diff options
Diffstat (limited to 'WebKitTools/Scripts/old-run-webkit-tests')
-rwxr-xr-x | WebKitTools/Scripts/old-run-webkit-tests | 81 |
1 files changed, 46 insertions, 35 deletions
diff --git a/WebKitTools/Scripts/old-run-webkit-tests b/WebKitTools/Scripts/old-run-webkit-tests index 68aa6ed..886b4a8 100755 --- a/WebKitTools/Scripts/old-run-webkit-tests +++ b/WebKitTools/Scripts/old-run-webkit-tests @@ -94,6 +94,7 @@ sub launchWithEnv(\@\%); sub resolveAndMakeTestResultsDirectory(); sub numericcmp($$); sub openDiffTool(); +sub buildDumpTool($); sub openDumpTool(); sub parseLeaksandPrintUniqueLeaks(); sub openWebSocketServerIfNeeded(); @@ -159,7 +160,6 @@ my $tmpDir = "/tmp"; my $testResultsDirectory = File::Spec->catfile($tmpDir, "layout-test-results"); my $testsPerDumpTool = 1000; my $threaded = 0; -my $html5treebuilder = 0; # DumpRenderTree has an internal timeout of 30 seconds, so this must be > 30. my $timeoutSeconds = 35; my $tolerance = 0; @@ -300,7 +300,6 @@ Usage: $programName [options] [testdir|testpath ...] --ignore-metrics Ignore metrics in tests --[no-]strip-editing-callbacks Remove editing callbacks from expected results -t|--threaded Run a concurrent JavaScript thead with each test - --html5-treebuilder Run the tests using the HTML5 tree builder --timeout t Sets the number of seconds before a test times out (default: $timeoutSeconds) --valgrind Run DumpRenderTree inside valgrind (Qt/Linux only) -v|--verbose More verbose output (overrides --quiet) @@ -344,7 +343,6 @@ my $getOptionsResult = GetOptions( 'slowest' => \$report10Slowest, 'strip-editing-callbacks!' => \$stripEditingCallbacks, 'threaded|t' => \$threaded, - 'html5-treebuilder' => \$html5treebuilder, 'timeout=i' => \$timeoutSeconds, 'tolerance=f' => \$tolerance, 'use-remote-links-to-tests' => \$useRemoteLinksToTests, @@ -399,40 +397,18 @@ $productDir .= "/Programs" if isGtk(); chdirWebKit(); -my $dumpToolName = $useWebKitTestRunner ? "WebKitTestRunner" : "DumpRenderTree"; - if (!defined($root)) { - my $dumpToolBuildScript = "build-" . lc($dumpToolName); - print STDERR "Running $dumpToolBuildScript\n"; - - local *DEVNULL; - my ($childIn, $childOut, $childErr); - if ($quiet) { - open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null"; - $childOut = ">&DEVNULL"; - $childErr = ">&DEVNULL"; - } else { - # When not quiet, let the child use our stdout/stderr. - $childOut = ">&STDOUT"; - $childErr = ">&STDERR"; - } - - my @args = argumentsForConfiguration(); - my $buildProcess = open3($childIn, $childOut, $childErr, "WebKitTools/Scripts/$dumpToolBuildScript", @args) or die "Failed to run build-dumprendertree"; - close($childIn); - waitpid $buildProcess, 0; - my $buildResult = $?; - close($childOut); - close($childErr); - - close DEVNULL if ($quiet); - - if ($buildResult) { - print STDERR "Compiling $dumpToolName failed!\n"; - exit exitStatus($buildResult); - } + # FIXME: We build both DumpRenderTree and WebKitTestRunner for + # WebKitTestRunner runs becuase DumpRenderTree still includes + # the DumpRenderTreeSupport module and the TestNetscapePlugin. + # These two projects should be factored out into their own + # projects. + buildDumpTool("DumpRenderTree"); + buildDumpTool("WebKitTestRunner") if $useWebKitTestRunner; } +my $dumpToolName = $useWebKitTestRunner ? "WebKitTestRunner" : "DumpRenderTree"; + $dumpToolName .= "_debug" if isCygwin() && configurationForVisualStudio() !~ /^Release|Debug_Internal$/; my $dumpTool = "$productDir/$dumpToolName"; die "can't find executable $dumpToolName (looked in $productDir)\n" unless -x $dumpTool; @@ -599,7 +575,6 @@ my $totalLeaks = 0; my @toolArgs = (); push @toolArgs, "--pixel-tests" if $pixelTests; push @toolArgs, "--threaded" if $threaded; -push @toolArgs, "--html5-treebuilder" if $html5treebuilder; push @toolArgs, "--complex-text" if $complexText; push @toolArgs, "-"; @@ -1365,6 +1340,41 @@ sub openDiffTool() $isDiffToolOpen = 1; } +sub buildDumpTool($) +{ + my ($dumpToolName) = @_; + + my $dumpToolBuildScript = "build-" . lc($dumpToolName); + print STDERR "Running $dumpToolBuildScript\n"; + + local *DEVNULL; + my ($childIn, $childOut, $childErr); + if ($quiet) { + open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null"; + $childOut = ">&DEVNULL"; + $childErr = ">&DEVNULL"; + } else { + # When not quiet, let the child use our stdout/stderr. + $childOut = ">&STDOUT"; + $childErr = ">&STDERR"; + } + + my @args = argumentsForConfiguration(); + my $buildProcess = open3($childIn, $childOut, $childErr, "WebKitTools/Scripts/$dumpToolBuildScript", @args) or die "Failed to run build-dumprendertree"; + close($childIn); + waitpid $buildProcess, 0; + my $buildResult = $?; + close($childOut); + close($childErr); + + close DEVNULL if ($quiet); + + if ($buildResult) { + print STDERR "Compiling $dumpToolName failed!\n"; + exit exitStatus($buildResult); + } +} + sub openDumpTool() { return if $isDumpToolOpen; @@ -1417,6 +1427,7 @@ sub openDumpTool() # Port specifics if (isGtk()) { $CLEAN_ENV{GTK_MODULES} = "gail"; + $CLEAN_ENV{WEBKIT_INSPECTOR_PATH} = "$productDir/resources/inspector"; } if (isQt()) { |