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

Unified Diff: scripts/common/chromium_utils.py

Issue 1393893004: Add `slave_alloc_update` tool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 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 | « masters/master.chromiumos/master.cfg ('k') | scripts/common/slave_alloc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/common/chromium_utils.py
diff --git a/scripts/common/chromium_utils.py b/scripts/common/chromium_utils.py
index 80b383f295cccc334687d35416554d0a75bbb755..dec2c8e04f57ff7a04e5c11fe40afba86c0be8b7 100644
--- a/scripts/common/chromium_utils.py
+++ b/scripts/common/chromium_utils.py
@@ -1260,14 +1260,16 @@ def ListMasters(cue='master.cfg', include_public=True, include_internal=True):
def MasterPath(mastername, include_public=True, include_internal=True):
- path = os.path.join(BUILD_DIR, 'masters', 'master.%s' % mastername)
- path_internal = os.path.join(
- BUILD_DIR, os.pardir, 'build_internal', 'masters',
- 'master.%s' % mastername)
- if include_public and os.path.isdir(path):
- return path
- if include_internal and os.path.isdir(path_internal):
- return path_internal
+ if not mastername.startswith('master.'):
ghost stip (do not use) 2015/10/21 16:26:06 weird. that should be for a user-facing util, not
+ mastername = 'master.' + mastername
+
+ for inc, base in (
+ (include_public, env.Build),
+ (include_internal, env.BuildInternal)):
+ if inc and base:
+ path = os.path.join(base, 'masters', mastername)
+ if os.path.isdir(path):
+ return path
raise LookupError('Path for master %s not found' % mastername)
@@ -1373,7 +1375,7 @@ def ParsePythonCfg(cfg_filepath, fail_hard=False):
if not os.path.exists(cfg_filepath):
return None
- # Execute 'slaves.sfg' in the master path environment.
+ # Execute 'slaves.cfg' in the master path environment.
with MasterEnvironment(os.path.dirname(os.path.abspath(cfg_filepath))):
try:
local_vars = {}
« no previous file with comments | « masters/master.chromiumos/master.cfg ('k') | scripts/common/slave_alloc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698