aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Serov <artem.serov@linaro.org>2021-09-14 11:21:57 +0100
committerArtem Serov <artem.serov@linaro.org>2021-09-14 11:21:57 +0100
commite9a6c9a5a32d40c68315b2f33590be603932de61 (patch)
tree0279345cfec90a696656d07fea4a4a08c4384349
parentee4e9742e8f907ed17daed7ec696104b89f19c5d (diff)
downloadart-build-scripts-e9a6c9a5a32d40c68315b2f33590be603932de61.tar.gz
Use a project-wide default target: armv8.
This changes all the script to use armv8 as a default lunch target; also removes the interactive way of querying that. Test: test_art_host.sh, test_art_vixl.sh. Change-Id: Ia7b885b84b89d557017317501e985decea9bc3b6
-rwxr-xr-xtests/test_art_host.sh5
-rwxr-xr-xtests/test_art_vixl.sh5
-rwxr-xr-xtests/test_boot_to_gui_emulator.sh9
-rw-r--r--utils/utils_android.sh20
4 files changed, 11 insertions, 28 deletions
diff --git a/tests/test_art_host.sh b/tests/test_art_host.sh
index a5c76b4f..b08876e5 100755
--- a/tests/test_art_host.sh
+++ b/tests/test_art_host.sh
@@ -28,7 +28,6 @@ source "${local_path}/../utils/utils_android_root.sh"
source "${local_path}/../utils/utils_run.sh"
readonly timer_name="Host Test"
-readonly default_lunch_target="aosp_arm64-eng"
job_count=${JCPU_COUNT}
@@ -104,7 +103,7 @@ usage() {
log I "This script is used to run the host Jenkins test."
log I "By default the lunch target is inferred from the environment as"
log I "\${TARGET_PRODUCT}-\${TARGET_BUILD_VARIANT} (as set up by the \`lunch\`"
- log I "command). If those are not defined \`${default_lunch_target}\` is used"
+ log I "command). If those are not defined, the default lunch target is used"
log I "instead. (current environment's default: $(lunch_target_from_env))"
log I " -h - help"
log I " -v - verbose"
@@ -219,7 +218,7 @@ test_jit() {
set_environment() {
source_android_environment_default
set_environment_host
- setup_android_target_to_environment_or_default "${default_lunch_target}"
+ setup_android_target_to_environment_or_default
if ${options["keep-failures"]}; then
set_environment_keep_test_failures
fi
diff --git a/tests/test_art_vixl.sh b/tests/test_art_vixl.sh
index e6c898a5..addbf426 100755
--- a/tests/test_art_vixl.sh
+++ b/tests/test_art_vixl.sh
@@ -26,7 +26,6 @@ source "${local_path}/../utils/utils_android.sh"
source "${local_path}/../utils/utils_android_root.sh"
readonly vixl_timer_name="VIXL Test"
-readonly default_lunch_target="aosp_arm64-eng"
readonly test_time_file="$(get_workspace)/time_test.txt"
# shellcheck disable=SC2034
@@ -44,7 +43,7 @@ usage() {
log I "This script is used to run the VIXL Jenkins test."
log I "By default the lunch target is inferred from the environment as"
log I "\${TARGET_PRODUCT}-\${TARGET_BUILD_VARIANT} (as set up by the \`lunch\`"
- log I "command). If those are not defined \`${default_lunch_target}\` is used"
+ log I "command). If those are not defined, the default lunch target is used"
log I "instead. (current environment's default: $(lunch_target_from_env))"
log I " -h - help"
log I " -v - verbose"
@@ -112,7 +111,7 @@ main() {
set_environment_host
- setup_android_target_to_environment_or_default "${default_lunch_target}"
+ setup_android_target_to_environment_or_default
test_vixl_selftests
test_art_integration
diff --git a/tests/test_boot_to_gui_emulator.sh b/tests/test_boot_to_gui_emulator.sh
index 5d261f7b..c51c9af6 100755
--- a/tests/test_boot_to_gui_emulator.sh
+++ b/tests/test_boot_to_gui_emulator.sh
@@ -22,7 +22,6 @@ readonly local_path=$(dirname "$0")
source "${local_path}/../utils/utils.sh"
source "${local_path}/../utils/utils_android.sh"
-readonly default_lunch_target="aosp_arm-eng"
readonly watchdog_timer="5m" # 5 minutes watchdog timer.
readonly test_timer_name="Boot to GUI Test"
readonly boot_timer_name="Time to GUI"
@@ -43,10 +42,10 @@ declare -A options=()
usage() {
log I "$0"
- log I "This script is used to run the boot ${default_lunch_target} Jenkins test."
+ log I "This script is used to run the boot Jenkins test."
log I "By default the lunch target is inferred from the environment as"
log I "\${TARGET_PRODUCT}-\${TARGET_BUILD_VARIANT} (as set up by the \`lunch\`"
- log I "command). If those are not defined \`${default_lunch_target}\` is used"
+ log I "command). If those are not defined default lunch target is used"
log I "instead. (current environment's default: $(lunch_target_from_env))"
log I " -h - help"
log I " -v - verbose"
@@ -54,7 +53,7 @@ usage() {
}
build_target() {
- log I "Building the ${default_lunch_target} target."
+ log I "Building the default lunch target."
make_build
}
@@ -104,7 +103,7 @@ main() {
# But if run in an interactive mode ask the user if he is OK to run with the
# default target.
source_android_environment_default
- setup_android_target_to_environment_or_default "${default_lunch_target}"
+ setup_android_target_to_environment_or_default
build_target
diff --git a/utils/utils_android.sh b/utils/utils_android.sh
index 2d76c18a..10e30cf2 100644
--- a/utils/utils_android.sh
+++ b/utils/utils_android.sh
@@ -17,6 +17,8 @@
# Common android build methods.
+readonly default_lunch_target="armv8"
+
start_adb_section() {
start_section "$1"
if [[ ${ART_TARGET_LINUX:-} != "true" ]]; then
@@ -77,25 +79,9 @@ setup_android_target() {
}
# $1: lunch target
-setup_android_target_to_default() {
- # In interactive mode, ask for confirmation.
- if [[ -t 0 ]]; then
- prompt="Are you sure you want to use the default lunch target "
- prompt+="\`$1\`? ([Yy] to confirm, anything else to cancel.)"
- read -r -n1 -p "${prompt} > "
- echo
- if [[ ${REPLY,} != y ]]; then
- log E "No Android Target has been setup."
- exit 1
- fi
- fi
- setup_android_target "$1"
-}
-
-# $1: lunch target
setup_android_target_to_environment_or_default() {
if ! env_defines_lunch_target; then
- setup_android_target_to_default "$1"
+ setup_android_target "${default_lunch_target}"
else
# We still need to run source ./build/envsetup.sh so that we can use
# special shell functions such as mma & co.