Changeset 122375 in webkit


Ignore:
Timestamp:
Jul 11, 2012 3:12:55 PM (12 years ago)
Author:
ojan@chromium.org
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):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r122366 r122375  
     12012-07-11  Ojan Vafai  <ojan@chromium.org>
     2
     3        Dedupe suffixes passed to webkit-patch rebaseline
     4        https://bugs.webkit.org/show_bug.cgi?id=91017
     5
     6        Reviewed by Dirk Pranke.
     7
     8        * Scripts/webkitpy/tool/commands/rebaseline.py:
     9        (Rebaseline._suffixes_to_update):
     10        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
     11        (test_rebaseline_multiple_builders_and_tests_command_line):
     12
    1132012-07-11  Kevin Ollivier  <kevino@theolliviers.com>
    214
  • trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py

    r122258 r122375  
    399399
    400400    def _suffixes_to_update(self, options):
    401         suffixes = []
     401        suffixes = set()
    402402        for suffix_list in options.suffixes:
    403             suffixes += suffix_list.split(",")
    404         return suffixes
     403            suffixes |= set(suffix_list.split(","))
     404        return list(suffixes)
    405405
    406406    def execute(self, options, args, tool):
  • trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

    r122258 r122375  
    466466            tool.executive = MockExecutive(should_log=True)
    467467
    468             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']}}
    469 """
    470 
    471             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
    472 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
    473 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
    474 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
     468            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']}}
     469"""
     470
     471            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
     472MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'wav,txt,png', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
     473MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'wav,txt,png', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
     474MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'wav,txt,png', '--builder', 'MOCK builder', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
    475475MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'wav,txt,png', 'mock/path/to/test.html'], cwd=/mock-checkout
    476476MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'wav,txt,png', 'mock/path/to/test2.html'], cwd=/mock-checkout
    477477"""
    478478
    479             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)
     479            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)
    480480
    481481        finally:
Note: See TracChangeset for help on using the changeset viewer.