Changeset 121799 in webkit
- Timestamp:
- Jul 3, 2012 12:30:10 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r121788 r121799 1 2012-07-03 Ojan Vafai <ojan@chromium.org> 2 3 Rename rebaseline-test to rebaseline-test-internal 4 https://bugs.webkit.org/show_bug.cgi?id=90485 5 6 Reviewed by Adam Barth. 7 8 It's now only used by other rebaseline commands. It's still useful to leave it 9 as it's own command to aid in debugging when something goes wrong. In a followup 10 patch, I'll make webkit-patch rebaseline cover any use-cases that rebaseline-test 11 might have covered. 12 13 We no longer need the --print-scm-changes option since the only caller always passes 14 that option in. 15 16 Also, make all the arguments command-line flags instead. Simplifies the code 17 a bit in my opinion. 18 19 * Scripts/webkitpy/tool/commands/rebaseline.py: 20 (RebaselineTest): 21 (RebaselineTest.__init__): 22 (RebaselineTest.execute): 23 (AbstractParallelRebaselineCommand._rebaseline_commands): 24 (RebaselineExpectations.execute): 25 * Scripts/webkitpy/tool/commands/rebaseline_unittest.py: 26 (test_rebaseline_all): 27 1 28 2012-07-03 Balazs Kelemen <kbalazs@webkit.org> 2 29 -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
r121724 r121799 69 69 70 70 class RebaselineTest(AbstractRebaseliningCommand): 71 name = "rebaseline-test" 72 help_text = "Rebaseline a single test from a buildbot. (Currently works only with build.chromium.org buildbots.)" 73 argument_names = "BUILDER_NAME TEST_NAME [PLATFORMS_TO_MOVE_EXISTING_BASELINES_TO]" 71 name = "rebaseline-test-internal" 72 help_text = "Rebaseline a single test from a buildbot. Only intended for use by other webkit-patch commands." 74 73 75 74 def __init__(self): 76 75 options = [ 77 optparse.make_option("--print-scm-changes", action="store_true", help="Print modifcations to the scm (as a json dict) rather than actually modifying the scm"), 76 optparse.make_option("--builder", help="Builder to pull new baselines from"), 77 optparse.make_option("--platform-to-move-to", help="Platform to move existing baselines to before rebaselining. This is for dealing with bringing up new ports that interact with non-tree portions of the fallback graph."), 78 optparse.make_option("--test", help="Test to rebaseline"), 78 79 ] 79 80 AbstractRebaseliningCommand.__init__(self, options=options) 80 self._print_scm_changes = False 81 self._scm_changes = {} 81 self._scm_changes = {'add': []} 82 82 83 83 def _results_url(self, builder_name): … … 136 136 137 137 def _add_to_scm(self, path): 138 if self._print_scm_changes: 139 self._scm_changes['add'].append(path) 140 else: 141 self._tool.scm().add(path) 138 self._scm_changes['add'].append(path) 142 139 143 140 def _update_expectations_file(self, builder_name, test_name): … … 180 177 def execute(self, options, args, tool): 181 178 self._baseline_suffix_list = options.suffixes.split(',') 182 self._print_scm_changes = options.print_scm_changes 183 self._scm_changes = {'add': [], 'delete': []} 184 185 if len(args) > 2: 186 platforms_to_move_existing_baselines_to = args[2:] 187 else: 188 platforms_to_move_existing_baselines_to = None 189 self._rebaseline_test_and_update_expectations(args[0], args[1], platforms_to_move_existing_baselines_to) 190 if self._print_scm_changes: 191 print json.dumps(self._scm_changes) 179 self._rebaseline_test_and_update_expectations(options.builder, options.test, options.platform_to_move_to) 180 print json.dumps(self._scm_changes) 192 181 193 182 … … 284 273 for builder in self._builders_to_fetch_from(test_list[test]): 285 274 suffixes = ','.join(test_list[test][builder]) 286 cmd_line = [path_to_webkit_patch, 'rebaseline-test ', '--print-scm-changes', '--suffixes', suffixes, builder, test]275 cmd_line = [path_to_webkit_patch, 'rebaseline-test-internal', '--suffixes', suffixes, '--builder', builder, '--test', test] 287 276 commands.append(tuple([cmd_line, cwd])) 288 277 return commands … … 372 361 373 362 374 # FIXME: Merge this with rebaseline-test. The only difference is that this prompts if you leave out the test-name, builder or suffixes. 375 # We should just make rebaseline-test prompt and get rid of this command. 363 # FIXME: Make this use AbstractParallelRebaselineCommand. 376 364 class Rebaseline(AbstractDeclarativeCommand): 377 365 name = "rebaseline" -
trunk/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
r121784 r121799 205 205 tool.executive = MockExecutive(should_log=True) 206 206 207 expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test ', '--print-scm-changes', '--suffixes', 'txt,png', 'MOCK builder', 'user-scripts/another-test.html'], cwd=/mock-checkout207 expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png', '--builder', 'MOCK builder', '--test', 'user-scripts/another-test.html'], cwd=/mock-checkout 208 208 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt,png', 'user-scripts/another-test.html'], cwd=/mock-checkout 209 209 """ 210 210 OutputCapture().assert_outputs(self, command._rebaseline, [options, {"user-scripts/another-test.html":{"MOCK builder": ["txt", "png"]}}], expected_stderr=expected_stderr) 211 211 212 expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test ', '--print-scm-changes', '--suffixes', 'txt,png', 'MOCK builder (Debug)', 'user-scripts/another-test.html'], cwd=/mock-checkout212 expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt,png', '--builder', 'MOCK builder (Debug)', '--test', 'user-scripts/another-test.html'], cwd=/mock-checkout 213 213 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt,png', 'user-scripts/another-test.html'], cwd=/mock-checkout 214 214 """ 215 215 OutputCapture().assert_outputs(self, command._rebaseline, [options, {"user-scripts/another-test.html":{"MOCK builder (Debug)": ["txt", "png"]}}], expected_stderr=expected_stderr) 216 216 217 expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test ', '--print-scm-changes', '--suffixes', 'txt', 'MOCK builder', 'user-scripts/another-test.html'], cwd=/mock-checkout217 expected_stderr = """MOCK run_command: ['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'MOCK builder', '--test', 'user-scripts/another-test.html'], cwd=/mock-checkout 218 218 MOCK run_command: ['echo', 'optimize-baselines', '--suffixes', 'txt', 'user-scripts/another-test.html'], cwd=/mock-checkout 219 219 """ … … 282 282 """ 283 283 284 expected_stdout = """[(['echo', 'rebaseline-test ', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Linux 32', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Linux', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Mac10.6', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Mac10.7', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Win7', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Apple Win 7 Release (Tests)', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'EFL Linux 64-bit Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Webkit Win', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'GTK Linux 64-bit Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Qt Linux Release', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'txt', 'Apple Lion Release WK1 (Tests)', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Linux 32', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Linux', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Mac10.6', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Mac10.7', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Win7', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Apple Win 7 Release (Tests)', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'EFL Linux 64-bit Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Webkit Win', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'GTK Linux 64-bit Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Qt Linux Release', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test', '--print-scm-changes', '--suffixes', 'png', 'Apple Lion Release WK1 (Tests)', 'userscripts/images.svg'], '/mock-checkout')]284 expected_stdout = """[(['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Webkit Linux 32', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Webkit Linux', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Webkit Mac10.6', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Webkit Mac10.7', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Webkit Win7', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Apple Win 7 Release (Tests)', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'EFL Linux 64-bit Release', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Webkit Win', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'GTK Linux 64-bit Release', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Qt Linux Release', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'txt', '--builder', 'Apple Lion Release WK1 (Tests)', '--test', 'userscripts/another-test.html'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Webkit Linux 32', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Webkit Linux', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Webkit Mac10.6', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Webkit Mac10.7', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Webkit Win7', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Apple Win 7 Release (Tests)', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'EFL Linux 64-bit Release', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Webkit Win', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'GTK Linux 64-bit Release', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Qt Linux Release', '--test', 'userscripts/images.svg'], '/mock-checkout'), (['echo', 'rebaseline-test-internal', '--suffixes', 'png', '--builder', 'Apple Lion Release WK1 (Tests)', '--test', 'userscripts/images.svg'], '/mock-checkout')] 285 285 """ 286 286
Note: See TracChangeset
for help on using the changeset viewer.