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

Unified Diff: tools/bots/bot_utils.py

Issue 289983003: Remove the dependency of tools/bot/bot_utils.py on tools/utils.py (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Restore GetUtils function, which is called by other files. Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bots/bot_utils.py
diff --git a/tools/bots/bot_utils.py b/tools/bots/bot_utils.py
index d0974e6682f8da8295715da51c495c741a686aca..a1e2f5d005b6661b818cb2883e0e7015b664ba8d 100644
--- a/tools/bots/bot_utils.py
+++ b/tools/bots/bot_utils.py
@@ -7,6 +7,7 @@
import hashlib
import imp
import os
+import platform
import string
import subprocess
import sys
@@ -18,8 +19,6 @@ def GetUtils():
'''Dynamically load the tools/utils.py python module.'''
return imp.load_source('utils', os.path.join(DART_DIR, 'tools', 'utils.py'))
-utils = GetUtils()
-
SYSTEM_RENAMES = {
'win32': 'windows',
'windows': 'windows',
@@ -222,7 +221,9 @@ class GSUtil(object):
def _layzCalculateGSUtilPath(self):
if not GSUtil.GSUTIL_PATH:
- buildbot_gsutil = utils.GetBuildbotGSUtilPath()
+ buildbot_gsutil = '/b/build/scripts/slave/gsutil'
+ if platform.system() == 'Windows':
+ buildbot_gsutil = 'e:\\\\b\\build\\scripts\\slave\\gsutil'
if os.path.isfile(buildbot_gsutil) and not GSUtil.USE_DART_REPO_VERSION:
GSUtil.GSUTIL_IS_SHELL_SCRIPT = True
GSUtil.GSUTIL_PATH = buildbot_gsutil
@@ -250,12 +251,14 @@ class GSUtil(object):
env = dict(os.environ)
# If we're on the buildbot, we use a specific boto file.
- if utils.GetUserName() == 'chrome-bot':
+ user_name = os.environ.get(
+ 'USERNAME' if sys.platform == 'win32' else 'USER', '')
+ if user_name == 'chrome-bot':
boto_config = {
- 'linux': '/mnt/data/b/build/site_config/.boto',
- 'macos': '/Volumes/data/b/build/site_config/.boto',
- 'win32': r'e:\b\build\site_config\.boto',
- }[utils.GuessOS()]
+ 'Linux': '/mnt/data/b/build/site_config/.boto',
+ 'Darwin': '/Volumes/data/b/build/site_config/.boto',
+ 'Windows': r'e:\b\build\site_config\.boto',
+ }[platform.system()]
env['AWS_CREDENTIAL_FILE'] = boto_config
env['BOTO_CONFIG'] = boto_config
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698