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

Unified Diff: Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 16888010: Fix RebaselineTest._copy_existing_baseline() to not assume that fallback directory names match port… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/tool/commands/rebaseline.py
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index 6a283f8db513fcfe4358b865fba423e0e93105b5..fdff81e183e90ef687e14b789eda37364ed2c593 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -116,14 +116,19 @@ class RebaselineTest(AbstractRebaseliningCommand):
pass
return immediate_predecessors_in_fallback
+ def _port_for_primary_baseline(self, baseline):
+ for port in [self._tool.port_factory.get(port_name) for port_name in self._tool.port_factory.all_port_names()]:
+ if self._tool.filesystem.basename(port.baseline_version_dir()) == baseline:
+ return port
+ raise Exception("Failed to find port for primary baseline %s." % baseline)
+
def _copy_existing_baseline(self, move_overwritten_baselines_to, test_name, suffix):
old_baselines = []
new_baselines = []
# Need to gather all the baseline paths before modifying the filesystem since
# the modifications can affect the results of port.expected_filename.
- for platform in move_overwritten_baselines_to:
- port = self._tool.port_factory.get(platform)
+ for port in [self._port_for_primary_baseline(baseline) for baseline in move_overwritten_baselines_to]:
old_baseline = port.expected_filename(test_name, "." + suffix)
if not self._tool.filesystem.exists(old_baseline):
_log.debug("No existing baseline for %s." % test_name)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698