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
This commit is contained in:
@@ -33,6 +33,10 @@ OUTPUT_DIR="$(mktemp -d)"
|
|||||||
SOONG_OUTPUT_DIR="$OUTPUT_DIR/soong"
|
SOONG_OUTPUT_DIR="$OUTPUT_DIR/soong"
|
||||||
BAZEL_OUTPUT_DIR="$OUTPUT_DIR/bazel"
|
BAZEL_OUTPUT_DIR="$OUTPUT_DIR/bazel"
|
||||||
|
|
||||||
|
function call_bazel() {
|
||||||
|
tools/bazel --output_base="$BAZEL_OUTPUT_DIR" $@
|
||||||
|
}
|
||||||
|
|
||||||
function cleanup {
|
function cleanup {
|
||||||
# call bazel clean because some bazel outputs don't have w bits.
|
# call bazel clean because some bazel outputs don't have w bits.
|
||||||
call_bazel clean
|
call_bazel clean
|
||||||
@@ -54,9 +58,6 @@ packages/modules/common/build/build_unbundled_mainline_module.sh \
|
|||||||
######################
|
######################
|
||||||
build/soong/soong_ui.bash --make-mode BP2BUILD_VERBOSE=1 --skip-soong-tests bp2build
|
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)"
|
BAZEL_OUT="$(call_bazel info output_path)"
|
||||||
|
|
||||||
call_bazel build --config=bp2build --config=ci --config=android_arm \
|
call_bazel build --config=bp2build --config=ci --config=android_arm \
|
||||||
|
Reference in New Issue
Block a user