improve error message when soong test fails early
apex_comparison_test.sh defines a helper function to clean up state on
exit, but in error conditions the call_bazel function is not always
defined.
Test: added an exit 1 statement below trap
Change-Id: I73b0c56c0a4a2d9ed1d4c0bf38b6ac0ac985e716
diff --git a/tests/apex_comparison_tests.sh b/tests/apex_comparison_tests.sh
index 4b2f795..ac3c177 100755
--- a/tests/apex_comparison_tests.sh
+++ b/tests/apex_comparison_tests.sh
@@ -33,6 +33,10 @@
SOONG_OUTPUT_DIR="$OUTPUT_DIR/soong"
BAZEL_OUTPUT_DIR="$OUTPUT_DIR/bazel"
+function call_bazel() {
+ tools/bazel --output_base="$BAZEL_OUTPUT_DIR" $@
+}
+
function cleanup {
# call bazel clean because some bazel outputs don't have w bits.
call_bazel clean
@@ -54,9 +58,6 @@
######################
build/soong/soong_ui.bash --make-mode BP2BUILD_VERBOSE=1 --skip-soong-tests bp2build
-function call_bazel() {
- tools/bazel --output_base="$BAZEL_OUTPUT_DIR" $@
-}
BAZEL_OUT="$(call_bazel info output_path)"
call_bazel build --config=bp2build --config=ci --config=android_arm \