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

Add checks in TAP file verification #5067

Merged
merged 1 commit into from
Feb 14, 2024
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
69 changes: 69 additions & 0 deletions buildenv/jenkins/tapVerification/aqaTap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ parseArgs() {
"--listTAP" | "-lt" )
listTAP; exit 0;;

"--checkFailed" | "-cf" )
checkFailed; exit 0;;

"--checkTAP" | "-ct" )
checkTAP; exit 0;;

"--help" | "-h" )
usage; exit 0;;

Expand Down Expand Up @@ -90,6 +96,10 @@ clean() {
find . -name "*.jck_*"
find . -name "*.jck_*" -exec rm -f {} ';'

echo "List and remove the above *_special.openjdk_* ..."
find . -name "*_special.openjdk_*"
find . -name "*_special.openjdk_*" -exec rm -f {} ';'

echo "List and remove the above *_special.system_* ..."
find . -name "*_special.system_*"
find . -name "*_special.system_*" -exec rm -f {} ';'
Expand Down Expand Up @@ -138,6 +148,18 @@ listFailed() {
grep -R 'not ok ' . || true
}

checkFailed() {
echo "============================"
echo "List failed tests in $(pwd)"
echo "============================"
if grep -R 'not ok ' . ; then
echo "[ERROR]: There are failed tests"
exit 1
else
echo "All Tests Passed!"
fi
}

listRerun() {
echo "============================"
echo "list rerun in Grinder..."
Expand All @@ -149,6 +171,53 @@ listRerun() {
find . -name "*_rerun*" | xargs grep 'ok '
}

findCmd() {
fileName=$2
echo "----------------------------"
echo "$1. List $fileName ..."
if [ "$(find . -name "$fileName")" ]; then
find . -name "$fileName" | sort
numFiles=$(find . -name "$fileName" -type f -print | wc -l)
echo "Total num of Files:$numFiles"
fileNameWithoutExt=${fileName//".tap"/""}
if [ $numFiles == 1 ]; then
if [ "$(find . -name "${fileNameWithoutExt}_testList*")" ]; then
find . -name "${fileNameWithoutExt}_testList*"
echo "Found 1 testList file. Looks like this is a parallel run, so multiple testList files are expected."
echo "[ERROR]: Missing testList TAP files"
exit 1
fi
else
for (( i=0; i < $numFiles; ++i ))
do
if [ "$(find . -name "${fileNameWithoutExt}_testList_${i}*")" == "" ]; then
echo "[ERROR]: Missing ${fileNameWithoutExt}_testList_${i}* TAP file"
exit 1
fi
done
fi
else
echo "[ERROR]: File not found"
exit 1
fi
}

checkTAP() {
echo "============================"
echo "check AQAvit TAP files in $(pwd)"
echo "============================"

findCmd 1 "*sanity.openjdk*.tap"
findCmd 2 "*extended.openjdk*.tap"
findCmd 3 "*sanity.functional*.tap"
findCmd 4 "*extended.functional*.tap"
findCmd 5 "*special.functional*.tap"
findCmd 6 "*sanity.system*.tap"
findCmd 7 "*extended.system*.tap"
findCmd 8 "*sanity.perf*.tap"
findCmd 9 "*extended.perf*.tap"
}

listTAP() {
echo "============================"
echo "list AQAvit TAP files in $(pwd)"
Expand Down