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

Unified Diff: scripts/slave/goma_utils.py

Issue 2306523002: Avoid to use environment. (Closed)
Patch Set: rebase Created 4 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 | « scripts/slave/compile.py ('k') | scripts/slave/recipe_modules/chromium/api.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/goma_utils.py
diff --git a/scripts/slave/goma_utils.py b/scripts/slave/goma_utils.py
index a1c1253ec4c8adfbdf108a2969547cf7e00f59f2..73033e15931d6106512d5167d63dc2aa9a151eb1 100644
--- a/scripts/slave/goma_utils.py
+++ b/scripts/slave/goma_utils.py
@@ -269,7 +269,9 @@ def GetCompilerProxyStartTime():
return datetime.datetime.strptime(matched.group(1), TIMESTAMP_FORMAT)
-def SendGomaTsMon(json_file, exit_status):
+def SendGomaTsMon(json_file, exit_status,
+ builder='unknown', master='unknown', slave='unknown',
+ clobber=''):
"""Send latest Goma status to ts_mon.
Args:
@@ -311,17 +313,13 @@ def SendGomaTsMon(json_file, exit_status):
num_failure = infra_status['num_exec_compiler_proxy_failure']
ping_status_code = infra_status['ping_status_code']
- clobber = 0
- if os.environ.get('BUILDBOT_CLOBBER'):
- clobber = 1
-
counter = {
'name': 'goma/failure',
'value': num_failure,
- 'builder': os.environ.get('BUILDBOT_BUILDERNAME', 'unknown'),
- 'master': os.environ.get('BUILDBOT_MASTERNAME', 'unknown'),
- 'slave': os.environ.get('BUILDBOT_SLAVENAME', 'unknown'),
- 'clobber': clobber,
+ 'builder': builder,
+ 'master': master,
+ 'slave': slave,
+ 'clobber': 1 if clobber else 0,
'os': chromium_utils.PlatformName(),
'ping_status_code': ping_status_code,
'result': result}
« no previous file with comments | « scripts/slave/compile.py ('k') | scripts/slave/recipe_modules/chromium/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698