Merge "revert addition of --skip-soong-test flag" am: 9bc50689c9 am: 3cbef527f0 am: def5eefbb7

Original change: https://android-review.googlesource.com/c/platform/build/+/2060119

Change-Id: I7f60617cc3da425444049cb8f7786a858181f3e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-04-11 17:22:14 +00:00 committed by Automerger Merge Worker
commit ed826115b7
1 changed files with 3 additions and 5 deletions

View File

@ -1796,17 +1796,15 @@ function _trigger_build()
# Convenience entry point (like m) to use Bazel in AOSP.
function b()
(
local skip_tests=$(echo "$@" | grep -ow -- "--skip-soong-tests")
local bazel_args=(${@/--skip-soong-tests/})
# Generate BUILD, bzl files into the synthetic Bazel workspace (out/soong/workspace).
_trigger_build "all-modules" bp2build USE_BAZEL_ANALYSIS= $skip_tests || return 1
_trigger_build "all-modules" bp2build USE_BAZEL_ANALYSIS= || return 1
# Then, run Bazel using the synthetic workspace as the --package_path.
if [[ -z "$bazel_args" ]]; then
if [[ -z "$@" ]]; then
# If there are no args, show help.
bazel help
else
# Else, always run with the bp2build configuration, which sets Bazel's package path to the synthetic workspace.
bazel $bazel_args --config=bp2build
bazel "$@" --config=bp2build
fi
)