Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 375dd60d authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "add flag to skip soong tests for b command"

parents ddfa3ff1 ef431491
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1727,15 +1727,17 @@ 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= || 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.
    if [[ -z "$@" ]]; then
    if [[ -z "$bazel_args" ]]; 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 "$@" --config=bp2build
        bazel $bazel_args --config=bp2build
    fi
)