Skip to content

Commit 1624979

Browse files
liuyqmwasilew
authored and
mwasilew
committed
tradefed and noninteractive-tradefed: install different openjdk version
for different android version cts/vts test. Now only aosp master version needs to use openjdk-11, other older versions need to use openjdk8 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
1 parent afc64fd commit 1624979

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

automated/android/noninteractive-tradefed/setup.sh

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
. ../../lib/android-test-lib
77

88
JDK="openjdk-8-jdk-headless"
9+
if [ -n "${ANDROID_VERSION}" ] && echo "${ANDROID_VERSION}" | grep -q "aosp-master"; then
10+
# only use openjdk-11 for aosp master version
11+
JDK="openjdk-11-jdk-headless"
12+
#elif 8.1/9.0/android10
13+
# JDK="openjdk-8-jdk-headless"
14+
fi
915

1016
PKG_DEPS="coreutils usbutils curl wget zip xz-utils python-lxml python-setuptools python-pexpect aapt lib32z1-dev libc6-dev-i386 lib32gcc1 libc6:i386 libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 python-dev python-protobuf protobuf-compiler python-virtualenv python-pip python-pexpect psmisc"
1117

automated/android/noninteractive-tradefed/tradefed.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ params:
3434
# Specify the failures number to be printed
3535
FAILURES_PRINTED: "0"
3636
TEST_REBOOT_EXPECTED: "false"
37-
# leave ANDROID_VERSION here as a stub so that jobs have ANDROID_VERSION specified won't report any problem
38-
# but it is not used any more, the default openjdk-8 will be used for cts/vts test
39-
# and in the future, maybe the jdk package installation is better to be done with the host deploy action
37+
# used to specify the android version
38+
# as different jdk version might be used for different android version cts/vts test
39+
# aosp-master version needs to use openjdk-11, other older versions needs to use openjdk-8
40+
# for aosp master version, the value of ANDROID_VERSION must have aosp-master in its value
4041
ANDROID_VERSION: ""
4142

4243
run:

automated/android/tradefed/setup.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@
66
. ../../lib/android-test-lib
77

88
JDK="openjdk-8-jdk-headless"
9-
PKG_DEPS="usbutils curl wget zip xz-utils python-lxml python-setuptools python-pexpect aapt lib32z1-dev libc6-dev-i386 lib32gcc1 libc6:i386 libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 python-dev python-protobuf protobuf-compiler python-virtualenv python-pip python-pexpect psmisc"
9+
if [ -n "${ANDROID_VERSION}" ] && echo "${ANDROID_VERSION}" | grep -q "aosp-master"; then
10+
# only use openjdk-11 for aosp master version
11+
JDK="openjdk-11-jdk-headless"
12+
#elif 8.1/9.0/android10
13+
# JDK="openjdk-8-jdk-headless"
14+
fi
15+
16+
PKG_DEPS="coreutils usbutils curl wget zip xz-utils python-lxml python-setuptools python-pexpect aapt lib32z1-dev libc6-dev-i386 lib32gcc1 libc6:i386 libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 python-dev python-protobuf protobuf-compiler python-virtualenv python-pip python-pexpect psmisc"
1017

1118
dist_name
1219
case "${dist}" in

automated/android/tradefed/tradefed.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ params:
3434
# Specify the failures number to be printed
3535
FAILURES_PRINTED: "0"
3636
TEST_REBOOT_EXPECTED: "false"
37-
# leave ANDROID_VERSION here as a stub so that jobs have ANDROID_VERSION specified won't report any problem
38-
# but it is not used any more, the default openjdk-8 will be used for cts/vts test
39-
# and in the future, maybe the jdk package installation is better to be done with the host deploy action
37+
# used to specify the android version
38+
# as different jdk version might be used for different android version cts/vts test
39+
# aosp-master version needs to use openjdk-11, other older versions needs to use openjdk-8
40+
# for aosp master version, the value of ANDROID_VERSION must have aosp-master in its value
4041
ANDROID_VERSION: ""
4142

4243
run:

0 commit comments

Comments
 (0)