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

Unified Diff: tools/dev/gm.py

Issue 2754253002: [tools] gm.py: start goma when it isn't running (Closed)
Patch Set: Created 3 years, 9 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/dev/gm.py
diff --git a/tools/dev/gm.py b/tools/dev/gm.py
index 2f41b614b095f45af058661073891e4aac4dfc0c..482f6e036a14e721f77d585e47eff49bfd831678 100755
--- a/tools/dev/gm.py
+++ b/tools/dev/gm.py
@@ -80,8 +80,16 @@ TESTSUITES_TARGETS = {"benchmarks": "d8",
OUTDIR = "out"
-IS_GOMA_MACHINE = (os.path.exists(os.path.expanduser("~/goma")) or
- os.environ.get('GOMADIR'))
+def DetectGoma():
+ home_goma = os.path.expanduser("~/goma")
+ if os.path.exists(home_goma):
+ return home_goma
+ if os.environ.get("GOMADIR"):
+ return os.environ.get("GOMADIR")
+ return None
+
+GOMADIR = DetectGoma()
+IS_GOMA_MACHINE = GOMADIR is not None
USE_GOMA = "true" if IS_GOMA_MACHINE else "false"
BUILD_OPTS = BUILD_OPTS_GOMA if IS_GOMA_MACHINE else BUILD_OPTS_DEFAULT
@@ -286,6 +294,10 @@ def Main(argv):
parser = ArgumentParser()
configs = parser.ParseArguments(argv[1:])
return_code = 0
+ # If we have Goma but it is not running, start it.
+ if (GOMADIR is not None and
+ _Call("ps -e | grep compiler_proxy > /dev/null", silent=True) != 0):
+ _Call("%s/goma_ctl.py ensure_start" % GOMADIR)
for c in configs:
return_code += configs[c].Build()
if return_code == 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