Title: [122375] trunk/Tools
Revision
122375
Author
[email protected]
Date
2012-07-11 15:12:55 -0700 (Wed, 11 Jul 2012)

Log Message

Dedupe suffixes passed to webkit-patch rebaseline
https://bugs.webkit.org/show_bug.cgi?id=91017

Reviewed by Dirk Pranke.

* Scripts/webkitpy/tool/commands/rebaseline.py:
(Rebaseline._suffixes_to_update):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(test_rebaseline_multiple_builders_and_tests_command_line):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (122374 => 122375)


--- trunk/Tools/ChangeLog	2012-07-11 21:52:22 UTC (rev 122374)
+++ trunk/Tools/ChangeLog	2012-07-11 22:12:55 UTC (rev 122375)
@@ -1,3 +1,15 @@
+2012-07-11  Ojan Vafai  <[email protected]>
+
+        Dedupe suffixes passed to webkit-patch rebaseline
+        https://bugs.webkit.org/show_bug.cgi?id=91017
+
+        Reviewed by Dirk Pranke.
+
+        * Scripts/webkitpy/tool/commands/rebaseline.py:
+        (Rebaseline._suffixes_to_update):
+        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+        (test_rebaseline_multiple_builders_and_tests_command_line):
+
 2012-07-11  Kevin Ollivier  <[email protected]>
 
         [wx] Unreviewed build fix. Add new directories and a new LayoutTestController method.

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py (122374 => 122375)


--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py	2012-07-11 21:52:22 UTC (rev 122374)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py	2012-07-11 22:12:55 UTC (rev 122375)
@@ -398,10 +398,10 @@
         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 = []
+        suffixes = set()
         for suffix_list in options.suffixes:
-            suffixes += suffix_list.split(",")
-        return suffixes
+            suffixes |= set(suffix_list.split(","))
+        return list(suffixes)
 
     def execute(self, options, args, tool):
         if options.builders:

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py (122374 => 122375)


--- trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py	2012-07-11 21:52:22 UTC (rev 122374)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py	2012-07-11 22:12:55 UTC (rev 122375)
@@ -465,18 +465,18 @@
 
             tool.executive = MockExecutive(should_log=True)
 
-            expected_stdout = """rebaseline-json: {'mock/path/to/test.html': {'MOCK builder2': ['txt', 'png', 'wav'], 'MOCK builder': ['txt', 'png', 'wav'], 'MOCK builder3': ['txt', 'png', 'wav']}, 'mock/path/to/test2.html': {'MOCK builder2': ['txt', 'png', 'wav'], 'MOCK builder': ['txt', 'png', 'wav'], 'MOCK builder3': ['txt', 'png', 'wav']}}
+            expected_stdout = """rebaseline-json: {'mock/path/to/test.html': {'MOCK builder2': ['wav', 'txt', 'png'], 'MOCK builder': ['wav', 'txt', 'png'], 'MOCK builder3': ['wav', 'txt', 'png']}, 'mock/path/to/test2.html': {'MOCK builder2': ['wav', 'txt', 'png'], 'MOCK builder': ['wav', 'txt', 'png'], 'MOCK builder3': ['wav', 'txt', 'png']}}
 """
 
-            expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
-MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
+            expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'wav,txt,png', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'wav,txt,png', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'wav,txt,png', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
+MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'wav,txt,png', '--builder', 'MOCK builder', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'wav,txt,png', 'mock/path/to/test.html'], cwd=/mock-checkout
 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'wav,txt,png', 'mock/path/to/test2.html'], cwd=/mock-checkout
 """
 
-            OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=["MOCK builder,MOCK builder2", "MOCK builder3"], suffixes=["txt", "png,wav"], verbose=True), ["mock/path/to/test.html", "mock/path/to/test2.html"], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
+            OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=["MOCK builder,MOCK builder2", "MOCK builder3"], suffixes=["txt,png", "png,wav,txt"], verbose=True), ["mock/path/to/test.html", "mock/path/to/test2.html"], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
 
         finally:
             builders._exact_matches = old_exact_matches
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to