Add atest shortcut in envsetup.sh.
Atest will run in the sequence of built -> prebuilt -> source code. Bug: b/118801769 Test: source build/envsetup.sh; lunch and atest will run in the appearing sequence above. Change-Id: I0494aeab99c390c31bb02641c6c1c11afd5642a2
This commit is contained in:
15
envsetup.sh
15
envsetup.sh
@@ -1567,10 +1567,19 @@ function provision()
|
|||||||
|
|
||||||
function atest()
|
function atest()
|
||||||
{
|
{
|
||||||
# TODO (sbasi): Replace this to be a destination in the build out when & if
|
# Let's use the built version over the prebuilt, then source code.
|
||||||
# atest is built by the build system. (This will be necessary if it ever
|
local os_arch=$(get_build_var HOST_PREBUILT_TAG)
|
||||||
# depends on external pip projects).
|
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 "$@"
|
"$(gettop)"/tools/tradefederation/core/atest/atest.py "$@"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Zsh needs bashcompinit called to support bash-style completion.
|
# Zsh needs bashcompinit called to support bash-style completion.
|
||||||
|
Reference in New Issue
Block a user