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

Unified Diff: chrome/test/functional/webpagereplay.py

Issue 10874025: Use dummynet-based network simulation for Mac tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drop DEPS change (previously applied) Created 8 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 | « chrome/test/functional/perf.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/webpagereplay.py
diff --git a/chrome/test/functional/webpagereplay.py b/chrome/test/functional/webpagereplay.py
index 45e448ad2cefa95fdfc646ab943a1a478a442b03..a34aaef166541691422e5cb6c5461fd892122c55 100755
--- a/chrome/test/functional/webpagereplay.py
+++ b/chrome/test/functional/webpagereplay.py
@@ -77,12 +77,12 @@ class ReplayServer(object):
Args:
archive_path: a path to a specific WPR archive (required).
- replay_options: a list of options strings to forward to replay.py.
+ replay_options: an iterable of options strings to forward to replay.py.
replay_dir: directory that has replay.py and related modules.
log_path: a path to a log file.
"""
self.archive_path = os.environ.get('WPR_ARCHIVE_PATH', archive_path)
- self.replay_options = replay_options or []
+ self.replay_options = list(replay_options or ())
self.replay_dir = os.environ.get('WPR_REPLAY_DIR', replay_dir or REPLAY_DIR)
self.log_path = log_path or LOG_PATH
@@ -109,7 +109,6 @@ class ReplayServer(object):
'--ssl_port', str(HTTPS_PORT),
'--use_closest_match',
'--no-dns_forwarding',
- # '--net', 'fios', # TODO(slamm): Add traffic shaping (requires root).
]
def _CheckPath(self, label, path):
@@ -153,8 +152,9 @@ class ReplayServer(object):
self.replay_process = subprocess.Popen(
cmd_line, stdout=self.log_fh, stderr=subprocess.STDOUT)
if not self.IsStarted():
+ log = open(self.log_path).read()
raise ReplayNotStartedError(
- 'Web Page Replay failed to start. See the log file: ' + self.log_name)
+ 'Web Page Replay failed to start. Log output:\n%s' % log)
def StopServer(self):
"""Stop Web Page Replay."""
« no previous file with comments | « chrome/test/functional/perf.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698