Skip to content

Commit

Permalink
Add test for b failing
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Colecf committed Jul 5, 2023
1 parent f164097 commit a497402
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/b_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a497402

Please sign in to comment.