diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2018-12-11 12:48:32 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2018-12-11 12:48:32 +0800 |
commit | 740b121fface903cd06fa0aec6e2fa11735cd644 (patch) | |
tree | 807ae9354aece17e3c6186eaf83aa205b83d8766 | |
parent | 8c19caf87aa2843cce0d7bb5ac44aaa4b9643f1e (diff) |
fix for setup.sh for ANDROID_VERSION checking
Change-Id: Ib3077a0882253f1685b027327880f4c9407fcee1
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-x | automated/android/noninteractive-tradefed/setup.sh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/automated/android/noninteractive-tradefed/setup.sh b/automated/android/noninteractive-tradefed/setup.sh index 86d8e69..6fba12a 100755 --- a/automated/android/noninteractive-tradefed/setup.sh +++ b/automated/android/noninteractive-tradefed/setup.sh @@ -1,14 +1,22 @@ -#!/bin/sh -x +#!/bin/bash -x # shellcheck disable=SC2154 # shellcheck disable=SC1091 . ../../lib/sh-test-lib . ../../lib/android-test-lib -if echo "$ANDROID_VERSION" | grep aosp-master ; then - JDK="openjdk-9-jdk-headless" -else +# ANDROID_VERSION was set in the format like change here: +# https://review.linaro.org/#/c/ci/job/configs/+/29367/ +if [ -z "${ANDROID_VERSION}" ]; then + # install jdk8 when nothing specified + # to avoid regression + JDK="openjdk-8-jdk-headless" +elif echo "${ANDROID_VERSION}" | grep -qe "android-8\." ; then + # install jdk8 for Oreo builds, both 8.0 and 8.1 JDK="openjdk-8-jdk-headless" +else + # Use Jdk9 for all other builds + JDK="openjdk-9-jdk-headless" fi 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" |