diff options
author | Philipp Wollermann <philwo@google.com> | 2015-12-14 12:55:25 +0000 |
---|---|---|
committer | Dmitry Lomov <dslomov@google.com> | 2015-12-15 11:59:57 +0000 |
commit | 5f2d25915bd863960557871edf46ef5e9586a9d5 (patch) | |
tree | 588c7c4a48c02876e0873dc8168e5f6edb910450 /src | |
parent | 713a78c88ae900b3cab08460a4b1428bf19a680c (diff) |
bazel_worker_test: Use pgrep instead of string magic to find workers.
--
MOS_MIGRATED_REVID=110143616
Diffstat (limited to 'src')
-rwxr-xr-x | src/test/shell/bazel/bazel_worker_test.sh | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/shell/bazel/bazel_worker_test.sh b/src/test/shell/bazel/bazel_worker_test.sh index a8003927ef..360c0de3c4 100755 --- a/src/test/shell/bazel/bazel_worker_test.sh +++ b/src/test/shell/bazel/bazel_worker_test.sh @@ -65,9 +65,7 @@ EOF function print_workers() { pid=$(bazel info | fgrep server_pid | cut -d' ' -f2) - # DANGER. This contains arcane shell wizardry that was carefully crafted to be compatible with - # both BSD and GNU tools so that this works under Linux and OS X. - ps ax -o ppid,pid | awk '{$1=$1};1' | egrep "^${pid} " | cut -d' ' -f2 + pgrep -P $pid || true } function shutdown_and_print_unkilled_workers() { |