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

Unified Diff: tools/telemetry/telemetry/core/browser_credentials.py

Issue 625123002: Make credential_path a page attribute instead of page_set attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert changes to path & path_unittest Created 6 years, 2 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 | « tools/perf/page_sets/tough_scheduling_cases.py ('k') | tools/telemetry/telemetry/core/util.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/browser_credentials.py
diff --git a/tools/telemetry/telemetry/core/browser_credentials.py b/tools/telemetry/telemetry/core/browser_credentials.py
index faeadeb49c0faba7a7011bb18bec61f5afacae1f..c2a3c8c1951ce629486812c5f68e6fd78cab3ee4 100644
--- a/tools/telemetry/telemetry/core/browser_credentials.py
+++ b/tools/telemetry/telemetry/core/browser_credentials.py
@@ -123,28 +123,18 @@ class BrowserCredentials(object):
if k in self._extra_credentials:
self._credentials[k] = self._extra_credentials[k]
- def WarnIfMissingCredentials(self, page_set):
- num_pages_missing_login = 0
- missing_credentials = set()
- for page in page_set:
- if (page.credentials
- and not self.CanLogin(page.credentials)):
- num_pages_missing_login += 1
- missing_credentials.add(page.credentials)
-
- if num_pages_missing_login > 0:
+ def WarnIfMissingCredentials(self, page):
+ if (page.credentials and not self.CanLogin(page.credentials)):
files_to_tweak = []
- if page_set.credentials_path:
- files_to_tweak.append(
- os.path.relpath(os.path.join(os.path.dirname(page_set.file_path),
- page_set.credentials_path)))
+ if page.credentials_path:
+ files_to_tweak.append(page.credentials_path)
files_to_tweak.append('~/.telemetry-credentials')
example_credentials_file = os.path.join(
util.GetTelemetryDir(), 'examples', 'credentials_example.json')
logging.warning("""
- Credentials for %s were not found. %i pages will not be tested.
+ Credentials for %s were not found. page %s will not be tested.
To fix this, either follow the instructions to authenticate to gsutil
here:
@@ -153,7 +143,5 @@ class BrowserCredentials(object):
or add your own credentials to:
%s
An example credentials file you can copy from is here:
- %s\n""" % (', '.join(missing_credentials),
- num_pages_missing_login,
- ' or '.join(files_to_tweak),
- example_credentials_file))
+ %s\n""" % (page.credentials, page, ' or '.join(files_to_tweak),
+ example_credentials_file))
« no previous file with comments | « tools/perf/page_sets/tough_scheduling_cases.py ('k') | tools/telemetry/telemetry/core/util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698