Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/optimize_baselines.py

Issue 2347643002: Refactor the way that SCM changes are tracked and aggregated in rebaseline.py. (Closed)
Patch Set: Removed Args/Returns from _serial_commands docstring. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import optparse 6 import optparse
7 7
8 from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer 8 from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer
9 from webkitpy.layout_tests.controllers.test_result_writer import baseline_name 9 from webkitpy.layout_tests.controllers.test_result_writer import baseline_name
10 from webkitpy.tool.commands.rebaseline import AbstractRebaseliningCommand 10 from webkitpy.tool.commands.rebaseline import AbstractRebaseliningCommand
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 port_names = tool.port_factory.all_port_names(options.platform) 44 port_names = tool.port_factory.all_port_names(options.platform)
45 if not port_names: 45 if not port_names:
46 _log.error("No port names match '%s'", options.platform) 46 _log.error("No port names match '%s'", options.platform)
47 return 47 return
48 port = tool.port_factory.get(port_names[0]) 48 port = tool.port_factory.get(port_names[0])
49 optimizer = BaselineOptimizer(tool, port, port_names, skip_scm_commands= options.no_modify_scm) 49 optimizer = BaselineOptimizer(tool, port, port_names, skip_scm_commands= options.no_modify_scm)
50 tests = port.tests(args) 50 tests = port.tests(args)
51 for test_name in tests: 51 for test_name in tests:
52 files_to_delete, files_to_add = self._optimize_baseline(optimizer, t est_name) 52 files_to_delete, files_to_add = self._optimize_baseline(optimizer, t est_name)
53 for path in files_to_delete: 53 for path in files_to_delete:
54 self._delete_from_scm_later(path) 54 self._scm_changes.delete_file(path)
55 for path in files_to_add: 55 for path in files_to_add:
56 self._add_to_scm_later(path) 56 self._scm_changes.add_file(path)
57 self._print_scm_changes() 57 self._print_scm_changes()
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698