OLD | NEW |
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 Loading... |
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() |
OLD | NEW |