Merge "bp2build: forward shared.whole_static_libs to the cc_shared_library target."
diff --git a/ci/bp2build.sh b/ci/bp2build.sh
index c52374f..d203967 100755
--- a/ci/bp2build.sh
+++ b/ci/bp2build.sh
@@ -16,11 +16,33 @@
# output should not be parsed as such.
rm -f out/ninja_build
-# Build targets under bionic/ for various architectures
-tools/bazel --max_idle_secs=5 build --config=bp2build --color=no --curses=no --show_progress_rate_limit=5 --platforms //build/bazel/platforms:android_x86 -k //bionic/... //system/...
-tools/bazel --max_idle_secs=5 build --config=bp2build --color=no --curses=no --show_progress_rate_limit=5 --platforms //build/bazel/platforms:android_x86_64 -k //bionic/... //system/...
-tools/bazel --max_idle_secs=5 build --config=bp2build --color=no --curses=no --show_progress_rate_limit=5 --platforms //build/bazel/platforms:android_arm -k //bionic/... //system/...
-tools/bazel --max_idle_secs=5 build --config=bp2build --color=no --curses=no --show_progress_rate_limit=5 --platforms //build/bazel/platforms:android_arm64 -k //bionic/... //system/...
+# We could create .bazelrc files and use them on buildbots with --bazelrc, but
+# it's simpler to use a list for now.
+BUILD_FLAGS_LIST=(
+ --color=no
+ --curses=no
+ --show_progress_rate_limit=5
+ --config=bp2build
+)
+BUILD_FLAGS="${BUILD_FLAGS_LIST[@]}"
+
+TEST_FLAGS_LIST=(
+ --keep_going
+ --test_output=errors
+)
+TEST_FLAGS="${TEST_FLAGS_LIST[@]}"
+
+# Build targets for various architectures.
+BUILD_TARGETS_LIST=(
+ //bionic/...
+ //system/...
+ //external/arm-optimized-routines/...
+)
+BUILD_TARGETS="${BUILD_TARGETS_LIST[@]}"
+tools/bazel --max_idle_secs=5 build ${BUILD_FLAGS} --platforms //build/bazel/platforms:android_x86 -k ${BUILD_TARGETS}
+tools/bazel --max_idle_secs=5 build ${BUILD_FLAGS} --platforms //build/bazel/platforms:android_x86_64 -k ${BUILD_TARGETS}
+tools/bazel --max_idle_secs=5 build ${BUILD_FLAGS} --platforms //build/bazel/platforms:android_arm -k ${BUILD_TARGETS}
+tools/bazel --max_idle_secs=5 build ${BUILD_FLAGS} --platforms //build/bazel/platforms:android_arm64 -k ${BUILD_TARGETS}
# Run tests.
-tools/bazel --max_idle_secs=5 test --config=bp2build --color=no --curses=no --show_progress_rate_limit=5 --test_output=errors -k //build/bazel/tests/...
+tools/bazel --max_idle_secs=5 test ${BUILD_FLAGS} ${TEST_FLAGS} //build/bazel/tests/...