From b8553ebe5adaf605785efe1c3aafa2138d7812f5 Mon Sep 17 00:00:00 2001 From: Lan Xia Date: Wed, 14 Feb 2024 15:26:33 -0500 Subject: [PATCH] Add checks in TAP file verification Signed-off-by: Lan Xia --- buildenv/jenkins/tapVerification/aqaTap.sh | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/buildenv/jenkins/tapVerification/aqaTap.sh b/buildenv/jenkins/tapVerification/aqaTap.sh index ce84231756..c7214c90e4 100755 --- a/buildenv/jenkins/tapVerification/aqaTap.sh +++ b/buildenv/jenkins/tapVerification/aqaTap.sh @@ -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;; @@ -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 {} ';' @@ -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..." @@ -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)"