Skip to content

Commit

Permalink
Made run.sh working out of cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
judovana committed Mar 12, 2024
1 parent b81d0e3 commit 4a0dca3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ while [ -h "$SCRIPT_SOURCE" ]; do # resolve $SOURCE until the file is no longer
done
readonly SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )"

pushd ${SCRIPT_DIR}

OS=`uname -s`
CYGWIN="false"
case "$OS" in
Expand Down Expand Up @@ -124,10 +126,18 @@ mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport

tar -czf test.${TIME}.tar.gz test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport

popd

if [ ! `readlink -f ${SCRIPT_DIR}` == `pwd` ] ; then
mv ${SCRIPT_DIR}/test.${TIME} .
mv -v ${SCRIPT_DIR}/test.${TIME}.tar.gz .
fi

if ! [ -f test.${TIME}/tests.log ] ; then
echo "Missing tests.log!" 1>&2
exit 1
fi

# passes should be present in tests.log
grep -Eqi '^passed:' test.${TIME}/tests.log || exit 1
# check for failures/errors in tests.log
Expand Down

0 comments on commit 4a0dca3

Please sign in to comment.