From f2b0c734a92d8f24f229f070a67cafcbb3c1987a Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Fri, 2 Dec 2022 10:48:24 -0800 Subject: [PATCH] Add test for bazel server shutdown/restart We recently had an issue where the bazel server couldn't be shutdown/restart because it was being run in a docker container with a PID 1 that wasn't capable of reaping zombie processes. Bug: 234449134 Test: abtd run of this test because it's not run on presubmit Change-Id: I1e179902364ea84fd55003389f3045de2e998991 --- tests/b_tests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/b_tests.sh b/tests/b_tests.sh index 45cb4f7382..13f156d712 100755 --- a/tests/b_tests.sh +++ b/tests/b_tests.sh @@ -27,6 +27,10 @@ b build "$test_target" b build "$test_target" --run-soong-tests b build --run-soong-tests "$test_target" b --run-soong-tests build "$test_target" +# Test that the bazel server can be restarted once shut down. If run in a +# docker container, you need to run the docker container with --init or +# have some other process as PID 1 that can reap zombies. +b shutdown b cquery 'kind(test, //build/bazel/examples/android_app/...)' --config=android b run $test_target -- --help >/dev/null