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

Unified Diff: buildbot/buildbot_pnacl_toolchain.py

Issue 2486313003: Make GOMA_DIR injected from env. (Closed)
Patch Set: moved NOSTART_GOMA and renamed it. Created 4 years, 1 month 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 ae1f7aca3fcd2ed97c351ca426fa0f0079fc346b..010a59d0f9a080381f061e4abaf25a23550d1964 100755
--- a/buildbot/buildbot_pnacl_toolchain.py
+++ b/buildbot/buildbot_pnacl_toolchain.py
@@ -28,7 +28,8 @@ 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_DEFAULT_PATH = '/b/build/goma'
+GOMA_PATH = os.environ.get('GOMA_DIR', GOMA_DEFAULT_PATH)
GOMA_CTL = os.path.join(GOMA_PATH, 'goma_ctl.py')
# As this is a buildbot script, we want verbose logging. Note however, that
@@ -78,6 +79,9 @@ toolchain_install_dir = os.path.join(
use_goma = (buildbot_lib.RunningOnBuildbot() and not args.no_goma
and os.path.isfile(GOMA_CTL))
+# If NOCONTROL_GOMA is set, the script does not start/stop goma compiler_proxy.
+control_goma = use_goma and not os.environ.get('NOCONTROL_GOMA')
+
def ToolchainBuildCmd(sync=False, extra_flags=[]):
sync_flag = ['--sync'] if sync else []
@@ -141,7 +145,7 @@ if host_os != 'win':
os.path.join(
NACL_DIR, '..', 'tools', 'clang', 'scripts', 'update.py')])
-if use_goma:
+if control_goma:
buildbot_lib.Command(context, cmd=[sys.executable, GOMA_CTL, 'restart'])
# toolchain_build outputs its own buildbot annotations, so don't use
@@ -155,7 +159,7 @@ if use_goma:
# First build only the packages that will be uploaded, and upload them.
RunWithLog(ToolchainBuildCmd(sync=True, extra_flags=['--canonical-only']))
-if use_goma:
+if control_goma:
buildbot_lib.Command(context, cmd=[sys.executable, GOMA_CTL, 'stop'])
if args.skip_tests:
« 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