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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py

Issue 2371803003: In webkitpy-patch rebaseline-cl, don't try to rebaseline non-existent tests. (Closed)
Patch Set: Add TODO 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py
index 2d056c366158b16794e467ecbf3bae4048a17794..0914a0df25e38f770f889e8f068c4dda2d7b6216 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py
@@ -73,12 +73,30 @@ class RebaselineCL(AbstractParallelRebaselineCommand):
else:
test_prefix_list = self._test_prefix_list(
issue_number, only_changed_tests=options.only_changed_tests)
+
+ # TODO(qyearsley): Fix places where non-existing tests may be added:
+ # 1. Make sure that the tests obtained when passing --only-changed-tests include only existing tests.
+ # 2. Make sure that update-w3c-test-expectations doesn't specify non-existing tests (http://crbug.com/649691).
+ test_prefix_list = self._filter_existing(test_prefix_list)
+
self._log_test_prefix_list(test_prefix_list)
if options.dry_run:
return
self._rebaseline(options, test_prefix_list)
+ def _filter_existing(self, test_prefix_list):
+ """Filters out entries in |test_prefix_list| for tests that don't exist."""
+ new_test_prefix_list = {}
+ port = self._tool.port_factory.get()
+ for test in test_prefix_list:
+ path = port.abspath_for_test(test)
+ if self._tool.filesystem.exists(path):
+ new_test_prefix_list[test] = test_prefix_list[test]
+ else:
+ _log.warning('%s not found, removing from list.', path)
+ return new_test_prefix_list
+
def _get_issue_number(self, options):
"""Gets the Rietveld CL number from either |options| or from the current local branch."""
if options.issue:
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698