[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ossy at webkit.org ossy at webkit.org
Wed Apr 7 23:57:17 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 877b7ad21c02df69a242406ded751e4320d7b08b
Author: ossy at webkit.org <ossy at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 25 22:26:15 2009 +0000

    run-webkit-tests doesn't accept directories/files with --skipped=only parameter
    https://bugs.webkit.org/show_bug.cgi?id=31799
    
    Reviewed by David Kilzer.
    
    * Scripts/run-webkit-tests: Fixed.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51395 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 8df5c82..710657d 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,12 @@
+2009-11-25  Csaba Osztrogonác  <ossy at webkit.org>
+
+        Reviewed by David Kilzer.
+
+        run-webkit-tests doesn't accept directories/files with --skipped=only parameter
+        https://bugs.webkit.org/show_bug.cgi?id=31799
+
+        * Scripts/run-webkit-tests: Fixed.
+
 2009-11-25  Zoltan Horvath  <zoltan at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/run-webkit-tests b/WebKitTools/Scripts/run-webkit-tests
index 1e37286..c27156e 100755
--- a/WebKitTools/Scripts/run-webkit-tests
+++ b/WebKitTools/Scripts/run-webkit-tests
@@ -97,6 +97,7 @@ sub pathcmp($$);
 sub printFailureMessageForTest($$);
 sub processIgnoreTests($$);
 sub readFromDumpToolWithTimer(**);
+sub readSkippedFiles($);
 sub recordActualResultsAndDiff($$);
 sub sampleDumpTool();
 sub setFileHandleNonBlocking(*$);
@@ -297,8 +298,6 @@ if (!$getOptionsResult || $showHelp) {
 my $ignoreSkipped = $treatSkipped eq "ignore";
 my $skippedOnly = $treatSkipped eq "only";
 
-!$skippedOnly || @ARGV == 0 or die "--skipped=only cannot be used when tests are specified on the command line.";
-
 my $configuration = configuration();
 
 $verbose = 1 if $testsPerDumpTool == 1;
@@ -455,7 +454,17 @@ if (!checkWebCoreWCSSSupport(0)) {
 }
 
 processIgnoreTests($ignoreTests, "ignore-tests") if $ignoreTests;
-readSkippedFiles() unless $ignoreSkipped;
+if (!$ignoreSkipped) {
+    if (!$skippedOnly || @ARGV == 0) {
+        readSkippedFiles("");
+    } else {
+        # Since readSkippedFiles() appends to @ARGV, we must use a foreach
+        # loop so that we only iterate over the original argument list.
+        foreach my $argnum (0 .. $#ARGV) {
+            readSkippedFiles(shift @ARGV);
+        }
+    }
+}
 
 my @tests = findTestsToRun();
 
@@ -2089,8 +2098,10 @@ sub fileShouldBeIgnored
     return 0;
 }
 
-sub readSkippedFiles
+sub readSkippedFiles($)
 {
+    my ($constraintPath) = @_;
+
     foreach my $level (@platformTestHierarchy) {
         if (open SKIPPED, "<", "$level/Skipped") {
             if ($verbose) {
@@ -2105,8 +2116,19 @@ sub readSkippedFiles
                 $skipped =~ s/[ \n\r]+$//;
                 if ($skipped && $skipped !~ /^#/) {
                     if ($skippedOnly) {
-                        if (!&fileShouldBeIgnored($skipped)) {
-                            push(@ARGV, $skipped);
+                        if (!fileShouldBeIgnored($skipped)) {
+                            if (!$constraintPath) {
+                                # Always add $skipped since no constraint path was specified on the command line.
+                                push(@ARGV, $skipped);
+                            } elsif ($skipped =~ /^($constraintPath)/) {
+                                # Add $skipped only if it matches the current path constraint, e.g.,
+                                # "--skipped=only dir1" with "dir1/file1.html" on the skipped list.
+                                push(@ARGV, $skipped);
+                            } elsif ($constraintPath =~ /^($skipped)/) {
+                                # Add current path constraint if it is more specific than the skip list entry,
+                                # e.g., "--skipped=only dir1/dir2/dir3" with "dir1" on the skipped list.
+                                push(@ARGV, $constraintPath);
+                            }
                         } elsif ($verbose) {
                             print "    $skipped\n";
                         }
@@ -2177,6 +2199,9 @@ sub findTestsToRun
         }
     }
 
+    # Remove duplicate tests
+    @testsToRun = keys %{{ map { $_ => 1 } @testsToRun }};
+
     @testsToRun = sort pathcmp @testsToRun;
 
     # Reverse the tests

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list