Skip to content

Commit 7587dc2

Browse files
sxaadamfarley
andauthored
Solaris simple dotests.sh: Fix issues with PWD (#4255)
* Fix issues with PWD Signed-off-by: Stewart X Addison <[email protected]> * Change syntax to avoid abort if UPSTREAM_JOBLINK not specified Signed-off-by: Stewart X Addison <[email protected]> * Update sbin/solaris/dotests.sh Co-authored-by: Adam Farley <[email protected]> --------- Signed-off-by: Stewart X Addison <[email protected]> Co-authored-by: Adam Farley <[email protected]>
1 parent 33fe318 commit 7587dc2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

sbin/solaris/dotests.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,34 @@ if [ $XVFB5 != 1 ]; then
3838
fi
3939
set -x
4040
rm -rf $HOME/workspace && mkdir $HOME/workspace && WORKSPACE=$HOME/workspace && export WORKSPACE
41+
pwd
4142
if [ "$3" = "usecache" ]; then
4243
cd aqa-tests || exit 1
4344
else
4445
rm -rf aqa-tests
4546
git clone https://github.com/adoptium/aqa-tests
46-
cd aqa-tests
4747
if [ -z "${UPSTREAM_JOBLINK}" ]; then
4848
# 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
49+
if [ ! -r "build_artifacts/filenames.txt" ]; then
50+
echo "ERROR: dotests.sh : UPSTREAM_JOBLINK not defined and build_artifacts/filenames.txt does not exist" - cannot progress
5151
exit 1
5252
fi
53-
JDK_TARBALL_NAME=$PWD/build_artifacts/`cat $PWD/build_artifacts/filenames.txt | grep "OpenJDK8U-jdk_.*tar.gz$"`
53+
JDK_TARBALL_NAME=`pwd`/build_artifacts/`cat build_artifacts/filenames.txt | grep "OpenJDK8U-jdk_.*tar.gz$"`
5454
else
5555
# Linter can go do one if it objects to the backticks - "$(" is not understood by Solaris' bourne shell (SC2006)
5656
JDK_TARBALL_NAME=`curl -s "${UPSTREAM_JOBLINK}/artifact/workspace/target/filenames.txt" | grep "OpenJDK8U-jdk_.*tar.gz$"`
5757
[ -z "$JDK_TARBALL_NAME" ] && echo "Could not retrieve filenames.txt from $UPSTREAM_JOBLINK" && exit 1
5858
echo Downloading and extracting JDK tarball ...
5959
curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JDK_TARBALL_NAME" || exit 1
6060
fi
61+
cd aqa-tests
6162
gzip -cd "$JDK_TARBALL_NAME" | tar xpf -
6263
echo Downloading and extracting JRE tarball ... Required for special.openjdk jdk_math_jre_0 target
6364
JRE_TARBALL_NAME="`echo $JDK_TARBALL_NAME | sed s/jdk/jre/`"
6465
if [ "$1" = "special" -a "$2" = "openjdk" ]; then
65-
[ ! -z "${UPSTREAM_JOBLINK}" ] && curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JRE_TARBALL_NAME" || exit 1
66+
if [ ! -z "${UPSTREAM_JOBLINK}" ]; then
67+
curl -O "${UPSTREAM_JOBLINK}/artifact/workspace/target/$JRE_TARBALL_NAME" || exit 1
68+
fi
6669
gzip -cd "$JRE_TARBALL_NAME" | tar xpf -
6770
fi
6871
fi

0 commit comments

Comments
 (0)