Commit 13952a1e authored by Jakob Kummerow's avatar Jakob Kummerow Committed by V8 LUCI CQ

[gm.py] Fix goma process detection on MacOS

On MacOS, `ps -e | grep foo` always finds a match, because `ps`
already sees the `grep` command, which matches the search string.
Luckily, `pgrep` exists as an elegant alternative.

No-Try: true
Change-Id: Ieedfe62ab11a59fb9a29ae1ebd39b164eec5193c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3144917
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76707}
parent 684f3cee
......@@ -506,7 +506,7 @@ def Main(argv):
return_code = 0
# If we have Goma but it is not running, start it.
if (IS_GOMA_MACHINE and
_Call("ps -e | grep compiler_proxy > /dev/null", silent=True) != 0):
_Call("pgrep -x compiler_proxy > /dev/null", silent=True) != 0):
_Call("%s/goma_ctl.py ensure_start" % GOMADIR)
for c in configs:
return_code += configs[c].Build()
......
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