summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2023-07-05 12:26:55 -0700
committer Cole Faust <colefaust@google.com> 2023-07-05 12:26:55 -0700
commita497402de7ff8c34ee01b6b04843e895b99d875f (patch)
tree25c89c904db28e649629ec8b25b93a952fcc4f9e
parentf164097056eb4a257c66cd22be4553734c2f59d3 (diff)
Add test for b failing
Because we've introduced bugs before where b doesn't exit with the correct status code when bazel fails. Bug: 289436072 Test: ./build/make/tests/b_tests.sh Change-Id: Ia9cb990c627f7b68636e6277a7c637d62312826d
-rwxr-xr-xtests/b_tests.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/b_tests.sh b/tests/b_tests.sh
index 491d762586..68a13e3b9c 100755
--- a/tests/b_tests.sh
+++ b/tests/b_tests.sh
@@ -23,6 +23,10 @@ lunch aosp_arm64
test_target=//build/bazel/scripts/difftool:difftool
+if b build //build/bazel:nonexistent_module &>/dev/null ; then
+ echo "b did not fail when building a nonexistent module" >&2
+ exit 1
+fi
b build "$test_target"
b build -- "$test_target"
b build "$test_target" --run-soong-tests