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
This commit is contained in:
Cole Faust
2022-12-02 10:48:24 -08:00
parent dd026fce63
commit f2b0c734a9

View File

@@ -27,6 +27,10 @@ b build "$test_target"
b build "$test_target" --run-soong-tests b build "$test_target" --run-soong-tests
b build --run-soong-tests "$test_target" b build --run-soong-tests "$test_target"
b --run-soong-tests build "$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 cquery 'kind(test, //build/bazel/examples/android_app/...)' --config=android
b run $test_target -- --help >/dev/null b run $test_target -- --help >/dev/null