Skip to content

Commit 19ed17e

Browse files
liuyqroxell
authored andcommitted
noninteractive-tradefed: disable ENABLE_XTS_DYNAMIC_DOWNLOADER by default
as suggested by google to avoid unexpected failures like the libcore java.lang.NoClassDefFoundError failures Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
1 parent 544711c commit 19ed17e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

automated/android/noninteractive-tradefed/tradefed.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ AP_KEY=""
2626
# default to set the wifi(when required) and check the internet when not specified or set to true
2727
# which means it needs to specify explicitly to false to not check the internet access
2828
INTERNET_ACCESS="true"
29+
# Disable ENABLE_XTS_DYNAMIC_DOWNLOADER by default as suggested by google.
30+
ENABLE_XTS_DYNAMIC_DOWNLOADER=${ENABLE_XTS_DYNAMIC_DOWNLOADER:-"false"}
2931

3032
check_internet_access() {
3133
if [ -n "${AP_SSID}" ] && [ -n "${AP_KEY}" ]; then
@@ -78,11 +80,11 @@ check_internet_access() {
7880
}
7981

8082
usage() {
81-
echo "Usage: $0 [-o timeout] [-n serialno] [-c cts_url] [-t test_params] [-p test_path] [-r <aggregated|atomic>] [-f failures_printed] [-a <ap_ssid>] [-k <ap_key>] [ -i [true|false]]" 1>&2
83+
echo "Usage: $0 [-o timeout] [-n serialno] [-c cts_url] [-t test_params] [-p test_path] [-r <aggregated|atomic>] [-f failures_printed] [-a <ap_ssid>] [-k <ap_key>] [ -i [true|false]] [-x [true|false]]" 1>&2
8284
exit 1
8385
}
8486

85-
while getopts ':o:n:c:t:p:r:f:a:k:i:' opt; do
87+
while getopts ':o:n:c:t:p:r:f:a:k:i:x:' opt; do
8688
case "${opt}" in
8789
o) TIMEOUT="${OPTARG}" ;;
8890
n) export ANDROID_SERIAL="${OPTARG}" ;;
@@ -94,6 +96,7 @@ while getopts ':o:n:c:t:p:r:f:a:k:i:' opt; do
9496
a) AP_SSID="${OPTARG}" ;;
9597
k) AP_KEY="${OPTARG}" ;;
9698
i) INTERNET_ACCESS="${OPTARG}" ;; # if check the internet access
99+
x) ENABLE_XTS_DYNAMIC_DOWNLOADER="${OPTARG}" ;;
97100
*) usage ;;
98101
esac
99102
done
@@ -140,6 +143,7 @@ if [ "X${INTERNET_ACCESS}" = "Xtrue" ] || [ "X${INTERNET_ACCESS}" = "XTrue" ]; t
140143
check_internet_access
141144
fi
142145

146+
export ENABLE_XTS_DYNAMIC_DOWNLOADER
143147
# Run tradefed test.
144148
info_msg "About to run tradefed shell on device ${ANDROID_SERIAL}"
145149
./tradefed-runner.py -t "${TEST_PARAMS}" -p "${TEST_PATH}" -r "${RESULT_FORMAT}" -f "${FAILURES_PRINTED}"

automated/android/noninteractive-tradefed/tradefed.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ params:
4949
# By default, WiFi setup and internet access checks are enabled (INTERNET_ACCESS="true").
5050
# To disable internet access checks, set INTERNET_ACCESS="false".
5151
INTERNET_ACCESS: "true"
52+
# Disable ENABLE_XTS_DYNAMIC_DOWNLOADER by default as suggested by google.
53+
ENABLE_XTS_DYNAMIC_DOWNLOADER: "false"
5254

5355
run:
5456
steps:
@@ -64,7 +66,7 @@ run:
6466
- chown testuser:testuser .
6567
- if echo "${TEST_REBOOT_EXPECTED}" |grep -i "true" ; then ./monitor_fastboot.sh & fi
6668
- ./monitor_adb.sh &
67-
- sudo -u testuser ./tradefed.sh -o "${TIMEOUT}" -c "${TEST_URL}" -t "${TEST_PARAMS}" -p "${TEST_PATH}" -r "${RESULTS_FORMAT}" -n "${ANDROID_SERIAL}" -f "${FAILURES_PRINTED}" -a "${AP_SSID}" -k "${AP_KEY}" -i "${INTERNET_ACCESS}" || if [ $? -eq 100 ]; then error_fatal "The network seems not available, as the ping command failed"; else true; fi
69+
- sudo -u testuser ./tradefed.sh -o "${TIMEOUT}" -c "${TEST_URL}" -t "${TEST_PARAMS}" -p "${TEST_PATH}" -r "${RESULTS_FORMAT}" -n "${ANDROID_SERIAL}" -f "${FAILURES_PRINTED}" -a "${AP_SSID}" -k "${AP_KEY}" -i "${INTERNET_ACCESS}" -x "${ENABLE_XTS_DYNAMIC_DOWNLOADER}"|| if [ $? -eq 100 ]; then error_fatal "The network seems not available, as the ping command failed"; else true; fi
6870
# Upload test log and result files to artifactorial.
6971
- cp -r ./${TEST_PATH}/results ./output/ || true
7072
- cp -r ./${TEST_PATH}/logs ./output/ || true

0 commit comments

Comments
 (0)