Changeset 122258 in webkit


Ignore:
Timestamp:
Jul 10, 2012 1:54:21 PM (12 years ago)
Author:
ojan@chromium.org
Message:

webkit-patch rebaseline doesn't work for audio/pixel tests
https://bugs.webkit.org/show_bug.cgi?id=90905

Reviewed by Adam Barth.

We just need to pass the correct suffix list to rebaseline-test-internal
and optimize-baselines. By default, pass all suffixes.

  • Scripts/webkitpy/tool/commands/rebaseline.py:

(Rebaseline):
(Rebaseline.init):
(Rebaseline._suffixes_to_update):
(Rebaseline.execute):

  • 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

    r122256 r122258  
     12012-07-10  Ojan Vafai  <ojan@chromium.org>
     2
     3        webkit-patch rebaseline doesn't work for audio/pixel tests
     4        https://bugs.webkit.org/show_bug.cgi?id=90905
     5
     6        Reviewed by Adam Barth.
     7
     8        We just need to pass the correct suffix list to rebaseline-test-internal
     9        and optimize-baselines. By default, pass all suffixes.
     10
     11        * Scripts/webkitpy/tool/commands/rebaseline.py:
     12        (Rebaseline):
     13        (Rebaseline.__init__):
     14        (Rebaseline._suffixes_to_update):
     15        (Rebaseline.execute):
     16        * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
     17        (test_rebaseline_multiple_builders_and_tests_command_line):
     18
    1192012-07-10  Adam Barth  <abarth@webkit.org>
    220
  • trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py

    r122234 r122258  
    366366class Rebaseline(AbstractParallelRebaselineCommand):
    367367    name = "rebaseline"
    368     help_text = "Replaces local expected.txt files with new results from build bots. Shows the list of failing tests on the builders if no test names are provided."
     368    help_text = "Rebaseline tests with results from the build bots. Shows the list of failing tests on the builders if no test names are provided."
    369369    argument_names = "[TEST_NAMES]"
    370370
     
    372372        options = [
    373373            optparse.make_option("--builders", default=None, action="append", help="Comma-separated-list of builders to pull new baselines from (can also be provided multiple times)"),
     374            optparse.make_option("--suffixes", default=BASELINE_SUFFIX_LIST, action="append", help="Comma-separated-list of file types to rebaseline (can also be provided multiple times)"),
    374375        ]
    375376        AbstractParallelRebaselineCommand.__init__(self, options=options)
     
    397398        return self._tool.user.prompt_with_list("Which test(s) to rebaseline for %s:" % builder.name(), failing_tests, can_choose_multiple=True)
    398399
     400    def _suffixes_to_update(self, options):
     401        suffixes = []
     402        for suffix_list in options.suffixes:
     403            suffixes += suffix_list.split(",")
     404        return suffixes
     405
    399406    def execute(self, options, args, tool):
    400407        if options.builders:
     
    412419                if test not in test_list:
    413420                    test_list[test] = {}
    414                 # FIXME: Allow for choosing the suffixes.
    415                 test_list[test][builder.name()] = ['txt']
     421                test_list[test][builder.name()] = self._suffixes_to_update(options)
    416422
    417423        if options.verbose:
  • trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

    r122234 r122258  
    368368"""
    369369
    370             OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=None, verbose=True), [], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
     370            OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=None, suffixes=["txt"], verbose=True), [], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
    371371
    372372        finally:
     
    400400            builder = "MOCK builder"
    401401            test = "mock/path/to/test.html"
    402             OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=[builder], verbose=True), [test], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
     402            OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=[builder], suffixes=["txt"], verbose=True), [test], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
    403403
    404404        finally:
     
    441441"""
    442442
    443             OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=None, verbose=True), [], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
     443            OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=None, suffixes=["txt"], verbose=True), [], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
    444444
    445445        finally:
     
    466466            tool.executive = MockExecutive(should_log=True)
    467467
    468             expected_stdout = """rebaseline-json: {'mock/path/to/test.html': {'MOCK builder2': ['txt'], 'MOCK builder': ['txt'], 'MOCK builder3': ['txt']}, 'mock/path/to/test2.html': {'MOCK builder2': ['txt'], 'MOCK builder': ['txt'], 'MOCK builder3': ['txt']}}
    469 """
    470 
    471             expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
    472 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
    473 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
    474 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK builder', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
    475 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt', 'mock/path/to/test.html'], cwd=/mock-checkout
    476 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt', 'mock/path/to/test2.html'], cwd=/mock-checkout
    477 """
    478 
    479             OutputCapture().assert_outputs(self, command.execute, [MockOptions(optimize=True, builders=["MOCK builder,MOCK builder2", "MOCK builder3"], verbose=True), ["mock/path/to/test.html", "mock/path/to/test2.html"], tool], expected_stdout=expected_stdout, expected_stderr=expected_stderr)
     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
     472MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout
     473MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
     474MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png,wav', '--builder', 'MOCK builder', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout
     475MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'wav,txt,png', 'mock/path/to/test.html'], cwd=/mock-checkout
     476MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'wav,txt,png', 'mock/path/to/test2.html'], cwd=/mock-checkout
     477"""
     478
     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)
    480480
    481481        finally:
Note: See TracChangeset for help on using the changeset viewer.