Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aligned run.sh with CryptoTests #19

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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