aboutsummaryrefslogtreecommitdiff
path: root/automated/android
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2019-12-01 18:25:29 +0800
committermwasilew <milosz.wasilewski@linaro.org>2019-12-02 11:26:19 +0000
commit16249792f2398b153fc8748b120c765b06400c48 (patch)
treeb3c4cf64beea56085383e3927b054d62780328ca /automated/android
parentafc64fd6f7880616d1171c3ec519fa6e78b19231 (diff)
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>
Diffstat (limited to 'automated/android')
-rwxr-xr-xautomated/android/noninteractive-tradefed/setup.sh6
-rw-r--r--automated/android/noninteractive-tradefed/tradefed.yaml7
-rwxr-xr-xautomated/android/tradefed/setup.sh9
-rw-r--r--automated/android/tradefed/tradefed.yaml7
4 files changed, 22 insertions, 7 deletions
diff --git a/automated/android/noninteractive-tradefed/setup.sh b/automated/android/noninteractive-tradefed/setup.sh
index 77a69f4..7406e0e 100755
--- a/automated/android/noninteractive-tradefed/setup.sh
+++ b/automated/android/noninteractive-tradefed/setup.sh
@@ -6,6 +6,12 @@
. ../../lib/android-test-lib
JDK="openjdk-8-jdk-headless"
+if [ -n "${ANDROID_VERSION}" ] && echo "${ANDROID_VERSION}" | grep -q "aosp-master"; then
+ # only use openjdk-11 for aosp master version
+ JDK="openjdk-11-jdk-headless"
+#elif 8.1/9.0/android10
+# JDK="openjdk-8-jdk-headless"
+fi
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"
diff --git a/automated/android/noninteractive-tradefed/tradefed.yaml b/automated/android/noninteractive-tradefed/tradefed.yaml
index e98c20d..a9c1802 100644
--- a/automated/android/noninteractive-tradefed/tradefed.yaml
+++ b/automated/android/noninteractive-tradefed/tradefed.yaml
@@ -34,9 +34,10 @@ params:
# Specify the failures number to be printed
FAILURES_PRINTED: "0"
TEST_REBOOT_EXPECTED: "false"
- # leave ANDROID_VERSION here as a stub so that jobs have ANDROID_VERSION specified won't report any problem
- # but it is not used any more, the default openjdk-8 will be used for cts/vts test
- # and in the future, maybe the jdk package installation is better to be done with the host deploy action
+ # used to specify the android version
+ # as different jdk version might be used for different android version cts/vts test
+ # aosp-master version needs to use openjdk-11, other older versions needs to use openjdk-8
+ # for aosp master version, the value of ANDROID_VERSION must have aosp-master in its value
ANDROID_VERSION: ""
run:
diff --git a/automated/android/tradefed/setup.sh b/automated/android/tradefed/setup.sh
index e8af2d3..c34a7a2 100755
--- a/automated/android/tradefed/setup.sh
+++ b/automated/android/tradefed/setup.sh
@@ -6,7 +6,14 @@
. ../../lib/android-test-lib
JDK="openjdk-8-jdk-headless"
-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"
+if [ -n "${ANDROID_VERSION}" ] && echo "${ANDROID_VERSION}" | grep -q "aosp-master"; then
+ # only use openjdk-11 for aosp master version
+ JDK="openjdk-11-jdk-headless"
+#elif 8.1/9.0/android10
+# JDK="openjdk-8-jdk-headless"
+fi
+
+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"
dist_name
case "${dist}" in
diff --git a/automated/android/tradefed/tradefed.yaml b/automated/android/tradefed/tradefed.yaml
index a7c65c0..0d5822d 100644
--- a/automated/android/tradefed/tradefed.yaml
+++ b/automated/android/tradefed/tradefed.yaml
@@ -34,9 +34,10 @@ params:
# Specify the failures number to be printed
FAILURES_PRINTED: "0"
TEST_REBOOT_EXPECTED: "false"
- # leave ANDROID_VERSION here as a stub so that jobs have ANDROID_VERSION specified won't report any problem
- # but it is not used any more, the default openjdk-8 will be used for cts/vts test
- # and in the future, maybe the jdk package installation is better to be done with the host deploy action
+ # used to specify the android version
+ # as different jdk version might be used for different android version cts/vts test
+ # aosp-master version needs to use openjdk-11, other older versions needs to use openjdk-8
+ # for aosp master version, the value of ANDROID_VERSION must have aosp-master in its value
ANDROID_VERSION: ""
run: