[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}
This commit is contained in:
parent
54db0236ce
commit
94efcfe01b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user