diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2018-01-11 21:22:28 +0530 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2018-01-11 21:52:16 +0530 |
commit | c2f142ff00f1498d1186cd425e7ea337e3d41749 (patch) | |
tree | 7e197117c43148752630c20675bab93bd08d81c2 | |
parent | 5034ccf40bd1a63930c3ef3af063ce4e97a3e4b7 (diff) |
tradefed: refactor the installation of needed jdk
Change-Id: I76464cc1a24892fa5158b9a26d9f83c8232138a6
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-x | automated/android/tradefed/setup.sh | 6 | ||||
-rwxr-xr-x | automated/android/tradefed/tradefed.sh | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/automated/android/tradefed/setup.sh b/automated/android/tradefed/setup.sh index 82dd0f0..e0f38d3 100755 --- a/automated/android/tradefed/setup.sh +++ b/automated/android/tradefed/setup.sh @@ -5,7 +5,11 @@ . ../../lib/sh-test-lib . ../../lib/android-test-lib -JDK="openjdk-8-jdk-headless" +if echo "$ANDROID_VERSION" | grep aosp-master ; then + JDK="openjdk-9-jdk-headless" +else + JDK="openjdk-8-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" dist_name diff --git a/automated/android/tradefed/tradefed.sh b/automated/android/tradefed/tradefed.sh index b63e2a1..31f64e7 100755 --- a/automated/android/tradefed/tradefed.sh +++ b/automated/android/tradefed/tradefed.sh @@ -19,7 +19,7 @@ usage() { exit 1 } -while getopts ':o:n:c:t:p:r:a:' opt; do +while getopts ':o:n:c:t:p:r:' opt; do case "${opt}" in o) TIMEOUT="${OPTARG}" ;; n) export ANDROID_SERIAL="${OPTARG}" ;; @@ -27,7 +27,6 @@ while getopts ':o:n:c:t:p:r:a:' opt; do t) TEST_PARAMS="${OPTARG}" ;; p) TEST_PATH="${OPTARG}" ;; r) RESULT_FORMAT="${OPTARG}" ;; - a) ANDROID_VERSION="${OPTARG}" ;; *) usage ;; esac done @@ -49,10 +48,6 @@ wait_boot_completed "${TIMEOUT}" # sufficient. # wait_homescreen "${TIMEOUT}" -if echo "$ANDROID_VERSION" | grep aosp-master ; then - install_deps openjdk-9-jdk-headless -fi - # Increase the heap size. KVM devices in LAVA default to ~250M of heap export _JAVA_OPTIONS="-Xmx350M" java -version |