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

Commit 52683088 authored by Jim Tang's avatar Jim Tang Committed by android-build-merger
Browse files

Merge "Add atest shortcut in envsetup.sh."

am: 4c969fa2

Change-Id: I4e47007747cca05d761c8dcaebc853858ae58ade
parents 60040d42 4c969fa2
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -1567,10 +1567,19 @@ function provision()

function atest()
{
    # TODO (sbasi): Replace this to be a destination in the build out when & if
    # atest is built by the build system. (This will be necessary if it ever
    # depends on external pip projects).
    # Let's use the built version over the prebuilt, then source code.
    local os_arch=$(get_build_var HOST_PREBUILT_TAG)
    local built_atest=${ANDROID_HOST_OUT}/bin/atest
    local prebuilt_atest="$(gettop)"/prebuilts/asuite/atest/$os_arch/atest
    if [[ -x $built_atest ]]; then
        $built_atest "$@"
    elif [[ -x $prebuilt_atest ]]; then
        $prebuilt_atest "$@"
    else
        # TODO: once prebuilt atest released, remove the source code section
        # and change the location of atest_completion.sh in addcompletions().
        "$(gettop)"/tools/tradefederation/core/atest/atest.py "$@"
    fi
}

# Zsh needs bashcompinit called to support bash-style completion.