webkit-patch rebaseline is broken
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2012 19:17:13 +0000 (19:17 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Nov 2012 19:17:13 +0000 (19:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=101235

Reviewed by Ojan Vafai.

It didn't get updated to handle the change in parsing --suffixes
properly, and the unit test didn't get updated either, masking the
problem.

* Scripts/webkitpy/tool/commands/rebaseline.py:
(Rebaseline._tests_to_update):
(Rebaseline.execute):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(TestRebaseline.test_rebaseline):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/tool/commands/rebaseline.py
Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

index a743e27..c99a3a5 100644 (file)
@@ -1,5 +1,22 @@
 2012-11-05  Dirk Pranke  <dpranke@chromium.org>
 
+        webkit-patch rebaseline is broken
+        https://bugs.webkit.org/show_bug.cgi?id=101235
+
+        Reviewed by Ojan Vafai.
+
+        It didn't get updated to handle the change in parsing --suffixes
+        properly, and the unit test didn't get updated either, masking the
+        problem.
+
+        * Scripts/webkitpy/tool/commands/rebaseline.py:
+        (Rebaseline._tests_to_update):
+        (Rebaseline.execute):
+        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+        (TestRebaseline.test_rebaseline):
+
+2012-11-05  Dirk Pranke  <dpranke@chromium.org>
+
         lint-webkitpy doesn't autoinstall pylint properly.
         https://bugs.webkit.org/show_bug.cgi?id=101106
 
index fc32bb3..effe6ce 100644 (file)
@@ -455,12 +455,6 @@ class Rebaseline(AbstractParallelRebaselineCommand):
         failing_tests = builder.latest_layout_test_results().tests_matching_failure_types([test_failures.FailureTextMismatch])
         return self._tool.user.prompt_with_list("Which test(s) to rebaseline for %s:" % builder.name(), failing_tests, can_choose_multiple=True)
 
-    def _suffixes_to_update(self, options):
-        suffixes = set()
-        for suffix_list in options.suffixes:
-            suffixes |= set(suffix_list.split(","))
-        return list(suffixes)
-
     def execute(self, options, args, tool):
         options.results_directory = None
         if options.builders:
@@ -471,13 +465,14 @@ class Rebaseline(AbstractParallelRebaselineCommand):
             builders = self._builders_to_pull_from()
 
         test_list = {}
+        suffixes_to_update = options.suffixes.split(",")
 
         for builder in builders:
             tests = args or self._tests_to_update(builder)
             for test in tests:
                 if test not in test_list:
                     test_list[test] = {}
-                test_list[test][builder.name()] = self._suffixes_to_update(options)
+                test_list[test][builder.name()] = suffixes_to_update
 
         if options.verbose:
             _log.debug("rebaseline-json: " + str(test_list))
index 044e8a0..2727a26 100644 (file)
@@ -297,14 +297,14 @@ class TestRebaseline(_BaseTestCase):
                 "MOCK builder": {"port_name": "test-mac-leopard", "specifiers": set(["mock-specifier"])},
             }
             oc.capture_output()
-            self.command.execute(MockOptions(optimize=False, builders=None, suffixes=["txt"], verbose=True, move_overwritten_baselines=False), [], self.tool)
+            self.command.execute(MockOptions(optimize=False, builders=None, suffixes="txt,png", verbose=True, move_overwritten_baselines=False), [], self.tool)
         finally:
             oc.restore_output()
             builders._exact_matches = old_exact_matches
 
         calls = filter(lambda x: x != ['qmake', '-v'] and x[0] != 'perl', self.tool.executive.calls)
         self.assertEquals(calls,
-            [[['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html', '--verbose']]])
+            [[['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html', '--verbose']]])
 
 
 class TestRebaselineExpectations(_BaseTestCase):