Merge "add flag to skip soong tests for b command" am: 375dd60d5a
am: 9244deabb0
am: 6fa65aef1c
Original change: https://android-review.googlesource.com/c/platform/build/+/2045666 Change-Id: I9b51987a12706961df931277d186c5a467c239bc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
a92032b7c6
|
@ -1741,15 +1741,17 @@ function _trigger_build()
|
||||||
# Convenience entry point (like m) to use Bazel in AOSP.
|
# Convenience entry point (like m) to use Bazel in AOSP.
|
||||||
function b()
|
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).
|
# Generate BUILD, bzl files into the synthetic Bazel workspace (out/soong/workspace).
|
||||||
_trigger_build "all-modules" bp2build USE_BAZEL_ANALYSIS= || return 1
|
_trigger_build "all-modules" bp2build USE_BAZEL_ANALYSIS= "$skip_tests" || return 1
|
||||||
# Then, run Bazel using the synthetic workspace as the --package_path.
|
# Then, run Bazel using the synthetic workspace as the --package_path.
|
||||||
if [[ -z "$@" ]]; then
|
if [[ -z "$bazel_args" ]]; then
|
||||||
# If there are no args, show help.
|
# If there are no args, show help.
|
||||||
bazel help
|
bazel help
|
||||||
else
|
else
|
||||||
# Else, always run with the bp2build configuration, which sets Bazel's package path to the synthetic workspace.
|
# Else, always run with the bp2build configuration, which sets Bazel's package path to the synthetic workspace.
|
||||||
bazel "$@" --config=bp2build
|
bazel $bazel_args --config=bp2build
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue