Allow expectations on directories in virtual test suites
authorenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 23:53:59 +0000 (23:53 +0000)
committerenne@google.com <enne@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Mar 2012 23:53:59 +0000 (23:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82250

Reviewed by Dirk Pranke.

lookup_virtual_test_base was only returning valid results for files
and not directories. Fix by falling back to the virtual test suite
mapping if possible.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.lookup_virtual_test_base):
* Scripts/webkitpy/layout_tests/port/test.py:
(TestPort.skipped_tests):
(TestPort.virtual_test_suites):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112176 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/base.py
Tools/Scripts/webkitpy/layout_tests/port/test.py

index 5d843f6..653e7d0 100644 (file)
@@ -1,3 +1,20 @@
+2012-03-26  Adrienne Walker  <enne@google.com>
+
+        Allow expectations on directories in virtual test suites
+        https://bugs.webkit.org/show_bug.cgi?id=82250
+
+        Reviewed by Dirk Pranke.
+
+        lookup_virtual_test_base was only returning valid results for files
+        and not directories. Fix by falling back to the virtual test suite
+        mapping if possible.
+
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        (Port.lookup_virtual_test_base):
+        * Scripts/webkitpy/layout_tests/port/test.py:
+        (TestPort.skipped_tests):
+        (TestPort.virtual_test_suites):
+
 2012-03-26  Dirk Pranke  <dpranke@chromium.org>
 
         Fix duplicated ChangeLog entry from r112171.
index 30e2b18..e62a45c 100755 (executable)
@@ -1090,7 +1090,7 @@ class Port(object):
     def lookup_virtual_test_base(self, test_name):
         for suite in self.populated_virtual_test_suites():
             if test_name.startswith(suite.name):
-                return suite.tests.get(test_name)
+                return test_name.replace(suite.name, suite.base)
         return None
 
     def lookup_virtual_test_args(self, test_name):
index cd53814..5934655 100644 (file)
@@ -403,7 +403,8 @@ class TestPort(Port):
         # This allows us to test the handling Skipped files, both with a test
         # that actually passes, and a test that does fail.
         return set(['failures/expected/skip_text.html',
-                    'failures/unexpected/skip_pass.html'])
+                    'failures/unexpected/skip_pass.html',
+                    'virtual/skipped'])
 
     def name(self):
         return self._name
@@ -488,6 +489,7 @@ class TestPort(Port):
     def virtual_test_suites(self):
         return [
             VirtualTestSuite('virtual/passes', 'passes', ['--virtual-arg']),
+            VirtualTestSuite('virtual/skipped', 'failures/expected', ['--virtual-arg2']),
         ]
 
 class TestDriver(Driver):