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

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

Issue 2069743002: Rebaseline the actual missing results only (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
index 8d9ca91d7fef1d292f2fe1c36ca9da57d5b7261e..13e143d08f80c71ea4caa3a11d95ebd77db6f59b 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
@@ -31,7 +31,7 @@ results directory), provides comparisons of expected and actual results (both
images and text) and allows one-click rebaselining of tests."""
from webkitpy.common.host import Host
-from webkitpy.common.net.layouttestresults import for_each_test, JSONTestResult
+from webkitpy.common.net.layouttestresults import LayoutTestResults
from webkitpy.layout_tests.layout_package import json_results_generator
from webkitpy.tool.commands.abstractlocalservercommand import AbstractLocalServerCommand
from webkitpy.tool.servers.rebaselineserver import get_test_baselines, RebaselineHTTPServer, STATE_NEEDS_REBASELINE
@@ -63,15 +63,15 @@ class RebaselineServer(AbstractLocalServerCommand):
# FIXME: make the rebaseline server use the hierarchical tree.
new_tests_subtree = {}
- def gather_baselines_for_test(test_name, result_dict):
- result = JSONTestResult(test_name, result_dict)
+ def gather_baselines_for_test(result):
if result.did_pass_or_run_as_expected():
return
+ result_dict = result.result_dict()
result_dict['state'] = STATE_NEEDS_REBASELINE
- result_dict['baselines'] = get_test_baselines(test_name, self._test_config)
- new_tests_subtree[test_name] = result_dict
+ result_dict['baselines'] = get_test_baselines(result.test_name(), self._test_config)
+ new_tests_subtree[result.test_name()] = result_dict
- for_each_test(results_json['tests'], gather_baselines_for_test)
+ LayoutTestResults(results_json).for_each_test(gather_baselines_for_test)
results_json['tests'] = new_tests_subtree
def _prepare_config(self, options, args, tool):

Powered by Google App Engine
This is Rietveld 408576698