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

Unified Diff: telemetry/telemetry/internal/util/webpagereplay_go_server.py

Issue 3001593002: WIP to install test CA
Patch Set: Created 3 years, 4 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 | « telemetry/telemetry/internal/platform/android_platform_backend.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/util/webpagereplay_go_server.py
diff --git a/telemetry/telemetry/internal/util/webpagereplay_go_server.py b/telemetry/telemetry/internal/util/webpagereplay_go_server.py
index 421d3661e1043dcfe255d1775ff9d4bd67e1f644..c1216a466001ea1becf5ed5de4b21fca6a3ba9f7 100644
--- a/telemetry/telemetry/internal/util/webpagereplay_go_server.py
+++ b/telemetry/telemetry/internal/util/webpagereplay_go_server.py
@@ -57,6 +57,8 @@ class ReplayServer(object):
self.WaitUntil(...)
"""
+ _go_binary_path = None
+
def __init__(self, archive_path, replay_host, http_port, https_port,
replay_options):
"""Initialize ReplayServer.
@@ -78,12 +80,9 @@ class ReplayServer(object):
# subprocess.
self._temp_log_file_path = None
- go_binary_path = binary_manager.FetchPath('wpr_go',
- py_utils.GetHostArchName(),
- py_utils.GetHostOsName())
-
self._cmd_line = self._GetCommandLine(
- go_binary_path, http_port, https_port, replay_options, archive_path)
+ self.GetGoBinaryPath(), http_port, https_port, replay_options,
+ archive_path)
if 'record' in replay_options:
self._CheckPath('archive directory', os.path.dirname(self.archive_path))
@@ -92,6 +91,14 @@ class ReplayServer(object):
self.replay_process = None
+
+ @classmethod
+ def GetGoBinaryPath(cls):
+ if cls._go_binary_path is None:
+ cls._go_binary_path = binary_manager.FetchPath(
+ 'wpr_go', py_utils.GetHostArchName(), py_utils.GetHostOsName())
+ return cls._go_binary_path
+
@property
def http_port(self):
if not self._IsStarted():
« no previous file with comments | « telemetry/telemetry/internal/platform/android_platform_backend.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698