Skip to content

Commit

Permalink
aligned run.sh with CryptoTests
Browse files Browse the repository at this point in the history
  • Loading branch information
judovana committed Nov 10, 2023
1 parent 8d704a7 commit dfecf48
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

################################################################################################
# to run without jtreg (without this wrapper), itshould be enough to use main makefile
###############################################################################################
# bash run.sh jdk [bug]
# bash run.sh jdk [dir]
# to run without jtreg (without this wrapper), it should be enough to use main makefile
################################################################################################

SCRIPT_SOURCE="${BASH_SOURCE[0]}"
Expand All @@ -26,12 +28,16 @@ if [ "x$JAVA_HOME" == "x" ] ; then
JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))
fi;

TIME=`date +%s`
TIME=$(date +%s)
BUGID=${2}

if [ "x$BUGID" != "x" ] ; then
FOLDER=$SCRIPT_DIR/jtreg-wrappers
if [ "x$BUGID" != "x" -a -e "$BUGID" ] ; then
FOLDER="$BUGID"
BUGID=""
elif [ "x$BUGID" != "x" ]; then
BUGID="-bug:$BUGID"
fi;
fi

if [ "x$JTREG_HOME" == "x" ] ; then
JTREG_HOME="$SCRIPT_DIR/jtreg"
Expand All @@ -50,16 +56,15 @@ fi

echo Running with $JAVA...

set +e # we want the compressed report and it will fail manually later

r=0
mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport
${JAVA_HOME}/bin/java -jar $JTREG_HOME/lib/jtreg.jar -v1 -a -ignore:quiet \
-w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport \
-jdk:$JAVA \
-xml \
$BUGID \
$SCRIPT_DIR/jtreg-wrappers \
| tee test.${TIME}/tests.log
-w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport \
-jdk:$JAVA \
-xml \
$BUGID \
$envVarArg \
$FOLDER | tee test.${TIME}/tests.log || r=$?

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

Expand All @@ -71,3 +76,5 @@ fi
grep -Eqi '^passed:' test.${TIME}/tests.log || exit 1
# check for failures/errors in tests.log
! grep -Eqi '^(failed|error):' test.${TIME}/tests.log || exit 1

exit $r

0 comments on commit dfecf48

Please sign in to comment.