diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2018-12-05 00:19:55 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2018-12-05 00:28:30 +0000 |
commit | e8c11776f2d3d62752a5f4d994865cf9fc2ae5fd (patch) | |
tree | 8a6ebd7815360e1decef02b08e0eba2fafacd729 /automated | |
parent | f4bf6e35e1f021ccba3e0bdf48fb0b1beea36958 (diff) |
noninteractive-tradefed: only install jdk8 for Oreo builds
and change to use jdk9 by default.
Normally we will specify ANDROID_VERSION to aosp-master
to install jdk9, and specify nothing to install jdk8,
here we change to install jdk8 when ANDROID_VERSION is
specified to O or nothing specified, and install jdk9
when other value is specified.
And this implementation should be only used after Oreo builds,
so there should be no regression for this change.
Change-Id: I8d84abc0c9647d4527869f6758e35de371b5edb3
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'automated')
-rwxr-xr-x | automated/android/noninteractive-tradefed/setup.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/automated/android/noninteractive-tradefed/setup.sh b/automated/android/noninteractive-tradefed/setup.sh index 86d8e69..d3f97c8 100755 --- a/automated/android/noninteractive-tradefed/setup.sh +++ b/automated/android/noninteractive-tradefed/setup.sh @@ -5,10 +5,15 @@ . ../../lib/sh-test-lib . ../../lib/android-test-lib -if echo "$ANDROID_VERSION" | grep aosp-master ; then - JDK="openjdk-9-jdk-headless" -else +if [ -z "${ANDROID_VERSION}" ]; then + # install jdk8 when nothing specified + # to avoid regression + JDK="openjdk-8-jdk-headless" +elif [ "X${ANDROID_VERSION}" = "XO" ] ; then 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" |