webkit-patch rebaseline-expectations doesn't work w/o failures specified
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2012 22:19:37 +0000 (22:19 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2012 22:19:37 +0000 (22:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=98810

Reviewed by Ojan Vafai.

If you try to mark a test as foo.html [ Rebaseline ] it wasn't
getting picked up for rebaselining; we needed to think the test
was failing.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations.get_rebaselining_failures):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(RebaseliningTest.test_get_rebaselining_failures):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py

index a6f8b76..7fe7489 100644 (file)
@@ -1,3 +1,19 @@
+2012-10-09  Dirk Pranke  <dpranke@chromium.org>
+
+        webkit-patch rebaseline-expectations doesn't work w/o failures specified
+        https://bugs.webkit.org/show_bug.cgi?id=98810
+
+        Reviewed by Ojan Vafai.
+
+        If you try to mark a test as foo.html [ Rebaseline ] it wasn't
+        getting picked up for rebaselining; we needed to think the test
+        was failing.
+
+        * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+        (TestExpectations.get_rebaselining_failures):
+        * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+        (RebaseliningTest.test_get_rebaselining_failures):
+
 2012-10-09  Daniel Bates  <dbates@webkit.org>
 
         VCSUtils.pm doesn't support SVN 1.7 diff files
index 32be476..b48c5b9 100644 (file)
@@ -869,7 +869,7 @@ class TestExpectations(object):
         return self._model
 
     def get_rebaselining_failures(self):
-        return self._model.get_test_set(REBASELINE, IMAGE) | self._model.get_test_set(REBASELINE, FAIL)
+        return self._model.get_test_set(REBASELINE)
 
     # FIXME: Change the callsites to use TestExpectationsModel and remove.
     def get_expectations(self, test):
index e1cd042..c3fc026 100644 (file)
@@ -524,9 +524,11 @@ class RebaseliningTest(Base):
                           'Bug(z) failures/expected/crash.html\n',
                           '')
 
+    def test_get_rebaselining_failures(self):
+        # Make sure we find a test as needing a rebaseline even if it is not marked as a failure.
+        self.parse_exp('Bug(x) failures/expected/text.html [ Rebaseline ]\n')
+        self.assertEqual(len(self._exp.get_rebaselining_failures()), 1)
 
-
-    def test_no_get_rebaselining_failures(self):
         self.parse_exp(self.get_basic_expectations())
         self.assertEqual(len(self._exp.get_rebaselining_failures()), 0)