| 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:
|
|
|