|
12 | 12 | #
|
13 | 13 | # SPDX-License-Identifier: Apache-2.0
|
14 | 14 | # ********************************************************************************
|
| 15 | +# shellcheck disable=SC2006 |
| 16 | +# |
| 17 | +# dotests.sh |
| 18 | +# Designed for running via a proxy machine for the Temurin Solaris tests |
| 19 | +# Expects the build under test to be either in $PWD/build_artifacts or |
| 20 | +# an accessible job name specified as UPSTREAM_JOBLINK e.g. |
| 21 | +# https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-solaris-x64-temurin-simplepipe/167 |
| 22 | +# |
| 23 | +# Requires two parameters for the name of the test suite to run e.g. |
| 24 | +# ./dotests.sh sanity openjdk |
| 25 | +# |
15 | 26 |
|
16 | 27 | if [ `uname -m` = i86pc ]; then ADOPTARCH=x64; else ADOPTARCH=sparcv9; fi
|
17 | 28 | # Check for Xvfb on display :5
|
|
33 | 44 | rm -rf aqa-tests
|
34 | 45 | git clone https://github.com/adoptium/aqa-tests
|
35 | 46 | cd aqa-tests
|
36 |
| - [ -z "$UPSTREAM_JOBLINK" ] && UPSTREAM_JOBLINK=https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk8u/job/jdk8u-solaris-${ADOPTARCH}-temurin-simple/lastSuccessfulBuild |
37 |
| - # Linter can go do one if it objects to the backticks - "$(" is not understood by Solaris' bourne shell |
38 |
| - JDK_TARBALL_NAME=`curl -s "${UPSTREAM_JOBLINK}/artifact/workspace/target/filenames.txt" | grep "OpenJDK8U-jdk_.*tar.gz$"` |
39 |
| - [ -z "$JDK_TARBALL_NAME" ] && echo "Could not retrieve filenames.txt from $UPSTREAM_JOBLINK" && exit 1 |
40 |
| - echo Downloading and extracting JDK tarball ... |
41 |
| - curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JDK_TARBALL_NAME" || exit 1 |
| 47 | + if [ -z "${UPSTREAM_JOBLINK}" ]; then |
| 48 | + # Jenkins simpletest job will copy the artifacts to this location |
| 49 | + if [ ! -r "$PWD/build_artifacts/filenames.txt" ]; then |
| 50 | + echo "dotests.sh : UPSTREAM_JOBLINK not defined and $PWD/build_artifacts/filenames.txt does not exist" - cannot progress |
| 51 | + exit 1 |
| 52 | + fi |
| 53 | + JDK_TARBALL_NAME=$PWD/build_artifacts/`cat $PWD/build_artifacts/filenames.txt | grep "OpenJDK8U-jdk_.*tar.gz$"` |
| 54 | + else |
| 55 | + # Linter can go do one if it objects to the backticks - "$(" is not understood by Solaris' bourne shell (SC2006) |
| 56 | + JDK_TARBALL_NAME=`curl -s "${UPSTREAM_JOBLINK}/artifact/workspace/target/filenames.txt" | grep "OpenJDK8U-jdk_.*tar.gz$"` |
| 57 | + [ -z "$JDK_TARBALL_NAME" ] && echo "Could not retrieve filenames.txt from $UPSTREAM_JOBLINK" && exit 1 |
| 58 | + echo Downloading and extracting JDK tarball ... |
| 59 | + curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JDK_TARBALL_NAME" || exit 1 |
| 60 | + fi |
42 | 61 | gzip -cd "$JDK_TARBALL_NAME" | tar xpf -
|
43 | 62 | echo Downloading and extracting JRE tarball ... Required for special.openjdk jdk_math_jre_0 target
|
44 | 63 | JRE_TARBALL_NAME="`echo $JDK_TARBALL_NAME | sed s/jdk/jre/`"
|
45 | 64 | if [ "$1" = "special" -a "$2" = "openjdk" ]; then
|
46 |
| - curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JRE_TARBALL_NAME" || exit 1 |
| 65 | + [ ! -z "${UPSTREAM_JOBLINK}" ] && curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JRE_TARBALL_NAME" || exit 1 |
47 | 66 | gzip -cd "$JRE_TARBALL_NAME" | tar xpf -
|
48 | 67 | fi
|
49 | 68 | fi
|
|
0 commit comments