diff options
author | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-12 19:45:25 +0000 |
---|---|---|
committer | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-12 19:45:25 +0000 |
commit | 3912d3f2ea4f6faea4c80ebe92de222439c8598b (patch) | |
tree | c6775fd96f7218b9a89085e333846c519f1c2f1a /tools | |
parent | 4cb84f79ca755c735464db0b6b29678e75a8050f (diff) | |
download | chromium_src-3912d3f2ea4f6faea4c80ebe92de222439c8598b.zip chromium_src-3912d3f2ea4f6faea4c80ebe92de222439c8598b.tar.gz chromium_src-3912d3f2ea4f6faea4c80ebe92de222439c8598b.tar.bz2 |
[telmetry] Report a better error when no archive path is set
R=tonyg
NOTRY=True
Review URL: https://chromiumcodereview.appspot.com/11863005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r-- | tools/telemetry/telemetry/page_runner.py | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/tools/telemetry/telemetry/page_runner.py b/tools/telemetry/telemetry/page_runner.py index 4faea00..6600ce6 100644 --- a/tools/telemetry/telemetry/page_runner.py +++ b/tools/telemetry/telemetry/page_runner.py @@ -70,21 +70,29 @@ class PageRunner(object): def Run(self, options, possible_browser, test, results): # Set up WPR mode. - archive_path = os.path.abspath(os.path.join(self.page_set.base_dir, - self.page_set.archive_path)) - if options.wpr_mode == wpr_modes.WPR_OFF: - if os.path.isfile(archive_path): - possible_browser.options.wpr_mode = wpr_modes.WPR_REPLAY - else: - possible_browser.options.wpr_mode = wpr_modes.WPR_OFF - if not self.page_set.ContainsOnlyFileURLs(): - logging.warning(""" -The page set archive %s does not exist, benchmarking against live sites! -Results won't be repeatable or comparable. - -To fix this, either add svn-internal to your .gclient using -http://goto/read-src-internal, or create a new archive using record_wpr. -""", os.path.relpath(archive_path)) + if not self.page_set.archive_path: + archive_path = '' + if not self.page_set.ContainsOnlyFileURLs(): + logging.warning(""" + No page set archive provided for the chosen page set. Benchmarking against + live sites! Results won't be repeatable or comparable. +""") + else: + archive_path = os.path.abspath(os.path.join(self.page_set.base_dir, + self.page_set.archive_path)) + if options.wpr_mode == wpr_modes.WPR_OFF: + if os.path.isfile(archive_path): + possible_browser.options.wpr_mode = wpr_modes.WPR_REPLAY + else: + possible_browser.options.wpr_mode = wpr_modes.WPR_OFF + if not self.page_set.ContainsOnlyFileURLs(): + logging.warning(""" + The page set archive %s does not exist, benchmarking against live sites! + Results won't be repeatable or comparable. + + To fix this, either add svn-internal to your .gclient using + http://goto/read-src-internal, or create a new archive using record_wpr. + """, os.path.relpath(archive_path)) # Verify credentials path. credentials_path = None |