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

Unified Diff: buildbot/buildbot_pnacl_toolchain.py

Issue 2234903002: Check for the existence of goma before trying to use it (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Check in buildbot_pnacl_toolchain.py instead Created 4 years, 4 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: buildbot/buildbot_pnacl_toolchain.py
diff --git a/buildbot/buildbot_pnacl_toolchain.py b/buildbot/buildbot_pnacl_toolchain.py
index c8283a94e50282a81c52d2d0622a36b380d2b713..ae1f7aca3fcd2ed97c351ca426fa0f0079fc346b 100755
--- a/buildbot/buildbot_pnacl_toolchain.py
+++ b/buildbot/buildbot_pnacl_toolchain.py
@@ -28,6 +28,9 @@ BUILD_DIR = os.path.join(NACL_DIR, 'build')
PACKAGE_VERSION_DIR = os.path.join(BUILD_DIR, 'package_version')
PACKAGE_VERSION_SCRIPT = os.path.join(PACKAGE_VERSION_DIR, 'package_version.py')
+GOMA_PATH = '/b/build/goma'
+GOMA_CTL = os.path.join(GOMA_PATH, 'goma_ctl.py')
+
# As this is a buildbot script, we want verbose logging. Note however, that
# toolchain_build has its own log settings, controlled by its CLI flags.
logging.getLogger().setLevel(logging.DEBUG)
@@ -72,7 +75,8 @@ toolchain_install_dir = os.path.join(
'%s_%s' % (host_os, pynacl.platform.GetArch()),
'pnacl_newlib')
-use_goma = buildbot_lib.RunningOnBuildbot() and not args.no_goma
+use_goma = (buildbot_lib.RunningOnBuildbot() and not args.no_goma
+ and os.path.isfile(GOMA_CTL))
def ToolchainBuildCmd(sync=False, extra_flags=[]):
@@ -103,7 +107,7 @@ def ToolchainBuildCmd(sync=False, extra_flags=[]):
executable_args.append('--disable-llvm-assertions')
if use_goma:
- executable_args.append('--goma=/b/build/goma')
+ executable_args.append('--goma=' + GOMA_PATH)
return [sys.executable] + executable_args + sync_flag + extra_flags
@@ -138,8 +142,7 @@ if host_os != 'win':
NACL_DIR, '..', 'tools', 'clang', 'scripts', 'update.py')])
if use_goma:
- buildbot_lib.Command(context, cmd=[
- sys.executable, '/b/build/goma/goma_ctl.py', 'restart'])
+ buildbot_lib.Command(context, cmd=[sys.executable, GOMA_CTL, 'restart'])
# toolchain_build outputs its own buildbot annotations, so don't use
# buildbot_lib.Step to run it here.
@@ -153,8 +156,7 @@ if use_goma:
RunWithLog(ToolchainBuildCmd(sync=True, extra_flags=['--canonical-only']))
if use_goma:
- buildbot_lib.Command(context, cmd=[
- sys.executable, '/b/build/goma/goma_ctl.py', 'stop'])
+ buildbot_lib.Command(context, cmd=[sys.executable, GOMA_CTL, 'stop'])
if args.skip_tests:
sys.exit(0)
« 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