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

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

Issue 561733003: Remove direct Host creation from RebaselineServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py b/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
index 2448f872400fdad7cc6a6b29ed83c6e0b33665c7..2075c990d293b4adc680d083cf2be46fa8a21291 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaselineserver.py
@@ -31,6 +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 import system
+from webkitpy.common.host import Host
from webkitpy.common.net.layouttestresults import for_each_test, JSONTestResult
from webkitpy.layout_tests.layout_package import json_results_generator
from webkitpy.tool.commands.abstractlocalservercommand import AbstractLocalServerCommand
@@ -38,13 +39,14 @@ from webkitpy.tool.servers.rebaselineserver import get_test_baselines, Rebaselin
class TestConfig(object):
- def __init__(self, test_port, layout_tests_directory, results_directory, platforms, filesystem, scm):
+ def __init__(self, test_port, layout_tests_directory, results_directory, platforms, host):
self.test_port = test_port
self.layout_tests_directory = layout_tests_directory
self.results_directory = results_directory
self.platforms = platforms
- self.filesystem = filesystem
- self.scm = scm
+ self.host = host
+ self.filesystem = host.filesystem
+ self.scm = host.scm()
class RebaselineServer(AbstractLocalServerCommand):
@@ -74,17 +76,17 @@ class RebaselineServer(AbstractLocalServerCommand):
def _prepare_config(self, options, args, tool):
results_directory = args[0]
- filesystem = system.filesystem.FileSystem()
- scm = self._tool.scm()
+ host = Host()
+ host.initialize_scm()
print 'Parsing full_results.json...'
- results_json_path = filesystem.join(results_directory, 'full_results.json')
- results_json = json_results_generator.load_json(filesystem, results_json_path)
+ results_json_path = host.filesystem.join(results_directory, 'full_results.json')
+ results_json = json_results_generator.load_json(host.filesystem, results_json_path)
port = tool.port_factory.get()
layout_tests_directory = port.layout_tests_dir()
- platforms = filesystem.listdir(filesystem.join(layout_tests_directory, 'platform'))
- self._test_config = TestConfig(port, layout_tests_directory, results_directory, platforms, filesystem, scm)
+ platforms = host.filesystem.listdir(host.filesystem.join(layout_tests_directory, 'platform'))
+ self._test_config = TestConfig(port, layout_tests_directory, results_directory, platforms, host)
print 'Gathering current baselines...'
self._gather_baselines(results_json)
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698