Commit 94efcfe0 authored by jkummerow's avatar jkummerow Committed by Commit bot

[tools] gm.py: start goma when it isn't running

NOTRY=true

Review-Url: https://codereview.chromium.org/2754253002
Cr-Commit-Position: refs/heads/master@{#43904}
parent 54db0236
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment