Changeset 122258 in webkit
- Timestamp:
- Jul 10, 2012 1:54:21 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r122256 r122258 1 2012-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 1 19 2012-07-10 Adam Barth <abarth@webkit.org> 2 20 -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
r122234 r122258 366 366 class Rebaseline(AbstractParallelRebaselineCommand): 367 367 name = "rebaseline" 368 help_text = "Re places local expected.txt files with new results frombuild 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." 369 369 argument_names = "[TEST_NAMES]" 370 370 … … 372 372 options = [ 373 373 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)"), 374 375 ] 375 376 AbstractParallelRebaselineCommand.__init__(self, options=options) … … 397 398 return self._tool.user.prompt_with_list("Which test(s) to rebaseline for %s:" % builder.name(), failing_tests, can_choose_multiple=True) 398 399 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 399 406 def execute(self, options, args, tool): 400 407 if options.builders: … … 412 419 if test not in test_list: 413 420 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) 416 422 417 423 if options.verbose: -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
r122234 r122258 368 368 """ 369 369 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) 371 371 372 372 finally: … … 400 400 builder = "MOCK builder" 401 401 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) 403 403 404 404 finally: … … 441 441 """ 442 442 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) 444 444 445 445 finally: … … 466 466 tool.executive = MockExecutive(should_log=True) 467 467 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-checkout472 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt ', '--builder', 'MOCK builder', '--test', 'mock/path/to/test.html'], cwd=/mock-checkout473 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt ', '--builder', 'MOCK builder2', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout474 MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt ', '--builder', 'MOCK builder', '--test', 'mock/path/to/test2.html'], cwd=/mock-checkout475 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', ' txt', 'mock/path/to/test.html'], cwd=/mock-checkout476 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', ' txt', 'mock/path/to/test2.html'], cwd=/mock-checkout477 """ 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 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 475 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'wav,txt,png', 'mock/path/to/test.html'], cwd=/mock-checkout 476 MOCK 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) 480 480 481 481 finally:
Note: See TracChangeset
for help on using the changeset viewer.