diff options
Diffstat (limited to 'WebKitTools/Scripts/run-webkit-tests')
-rwxr-xr-x | WebKitTools/Scripts/run-webkit-tests | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/WebKitTools/Scripts/run-webkit-tests b/WebKitTools/Scripts/run-webkit-tests index 6b21e48..809e078 100755 --- a/WebKitTools/Scripts/run-webkit-tests +++ b/WebKitTools/Scripts/run-webkit-tests @@ -67,6 +67,7 @@ use Time::HiRes qw(time usleep); use List::Util 'shuffle'; use lib $FindBin::Bin; +use webkitperl::features; use webkitperl::httpd; use webkitdirs; use VCSUtils; @@ -154,9 +155,15 @@ my $treatSkipped = "default"; my $useRemoteLinksToTests = 0; my $useValgrind = 0; my $verbose = 0; +my $shouldWaitForHTTPD = 0; my @leaksFilenames; +if (isWindows() || isMsys()) { + print "This script has to be run under Cygwin to function correctly.\n"; + exit 1; +} + # Default to --no-http for wx for now. $testHTTP = 0 if (isWx()); @@ -224,6 +231,7 @@ Usage: $programName [options] [testdir|testpath ...] --exit-after-n-failures N Exit after the first N failures instead of running all tests -h|--help Show this help message --[no-]http Run (or do not run) http tests (default: $httpDefault) + --[no-]wait-for-httpd Wait for httpd if some other test session is using it already (same as WEBKIT_WAIT_FOR_HTTPD=1). (default: $shouldWaitForHTTPD) -i|--ignore-tests Comma-separated list of directories or tests to ignore --iterations n Number of times to run the set of tests (e.g. ABCABCABC) --[no-]launch-safari Launch (or do not launch) Safari to display test results (default: $launchSafariDefault) @@ -267,6 +275,7 @@ my $getOptionsResult = GetOptions( 'guard-malloc|g' => \$guardMalloc, 'help|h' => \$showHelp, 'http!' => \$testHTTP, + 'wait-for-httpd!' => \$shouldWaitForHTTPD, 'ignore-metrics!' => \$ignoreMetrics, 'ignore-tests|i=s' => \$ignoreTests, 'iterations=i' => \$iterations, @@ -308,6 +317,8 @@ my $skippedOnly = $treatSkipped eq "only"; my $configuration = configuration(); +# We need an environment variable to be able to enable the feature per-slave +$shouldWaitForHTTPD = $ENV{"WEBKIT_WAIT_FOR_HTTPD"} unless ($shouldWaitForHTTPD); $verbose = 1 if $testsPerDumpTool == 1; if ($shouldCheckLeaks && $testsPerDumpTool > 1000) { @@ -410,12 +421,12 @@ my %ignoredDirectories = map { $_ => 1 } qw(platform); my %ignoredLocalDirectories = map { $_ => 1 } qw(.svn _svn resources script-tests); my %supportedFileExtensions = map { $_ => 1 } qw(html shtml xml xhtml pl php); -if (!checkWebCoreMathMLSupport(0)) { +if (!checkWebCoreFeatureSupport("MathML", 0)) { $ignoredDirectories{'mathml'} = 1; } -# FIXME: We should fix webkitdirs.pm:hasSVG/WMLSupport() to do the correct feature detection for Cygwin. -if (checkWebCoreSVGSupport(0)) { +# FIXME: We should fix webkitperl/features.pm:hasFeature() to do the correct feature detection for Cygwin. +if (checkWebCoreFeatureSupport("SVG", 0)) { $supportedFileExtensions{'svg'} = 1; } elsif (isCygwin()) { $supportedFileExtensions{'svg'} = 1; @@ -433,20 +444,20 @@ if (!$testMedia) { $ignoredDirectories{'http/tests/media'} = 1; } -if (!checkWebCoreAcceleratedCompositingSupport(0)) { +if (!checkWebCoreFeatureSupport("Accelerated Compositing", 0)) { $ignoredDirectories{'compositing'} = 1; } -if (!checkWebCore3DRenderingSupport(0)) { +if (!checkWebCoreFeatureSupport("3D Rendering", 0)) { $ignoredDirectories{'animations/3d'} = 1; $ignoredDirectories{'transforms/3d'} = 1; } -if (!checkWebCore3DCanvasSupport(0)) { +if (!checkWebCoreFeatureSupport("3D Canvas", 0)) { $ignoredDirectories{'fast/canvas/webgl'} = 1; } -if (checkWebCoreWMLSupport(0)) { +if (checkWebCoreFeatureSupport("WML", 0)) { $supportedFileExtensions{'wml'} = 1; } else { $ignoredDirectories{'http/tests/wml'} = 1; @@ -454,14 +465,10 @@ if (checkWebCoreWMLSupport(0)) { $ignoredDirectories{'wml'} = 1; } -if (!checkWebCoreXHTMLMPSupport(0)) { +if (!checkWebCoreFeatureSupport("XHTMLMP", 0)) { $ignoredDirectories{'fast/xhtmlmp'} = 1; } -if (!checkWebCoreWCSSSupport(0)) { - $ignoredDirectories{'fast/wcss'} = 1; -} - processIgnoreTests($ignoreTests, "ignore-tests") if $ignoreTests; if (!$ignoreSkipped) { if (!$skippedOnly || @ARGV == 0) { @@ -943,7 +950,14 @@ for my $test (@tests) { } } } -printf "\n%0.2fs total testing time\n", (time - $overallStartTime) . ""; +my $totalTestingTime = time - $overallStartTime; +my $waitTime = getWaitTime(); +if ($waitTime > 0.1) { + my $normalizedTestingTime = $totalTestingTime - $waitTime; + printf "\n%0.2fs HTTPD waiting time\n", $waitTime . ""; + printf "%0.2fs normalized testing time", $normalizedTestingTime . ""; +} +printf "\n%0.2fs total testing time\n", $totalTestingTime . ""; !$isDumpToolOpen || die "Failed to close $dumpToolName.\n"; @@ -1360,6 +1374,7 @@ sub configureAndOpenHTTPDIfNeeded() my @defaultArgs = getDefaultConfigForTestDirectory($testDirectory); @args = (@defaultArgs, @args); + waitForHTTPDLock() if $shouldWaitForHTTPD; $isHttpdOpen = openHTTPD(@args); } @@ -1383,6 +1398,7 @@ sub openWebSocketServerIfNeeded() "-d", "$webSocketHandlerDir", "-s", "$webSocketHandlerScanDir", "-m", "$webSocketHandlerMapFile", + "-x", "/websocket/tests/cookies", "-l", "$logFile", "--strict", ); |