From e3fe8f0fcef1f63ffc4abc7d359816c010e39e22 Mon Sep 17 00:00:00 2001 From: mjholder Date: Thu, 26 Oct 2023 11:23:48 -0400 Subject: [PATCH] Ensure JUnit tests pass (#30) * check there are IQE CJI artifacts from tests --- cji_smoke_test.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cji_smoke_test.sh b/cji_smoke_test.sh index 49d83a07..d0c5dabb 100644 --- a/cji_smoke_test.sh +++ b/cji_smoke_test.sh @@ -181,5 +181,33 @@ if [ "$MINIO_SUCCESS" = false ]; then exit 1 fi +echo "checking if files exist" + +JUNIT_SEQUENTIAL_OUTPUTS=( + "iqe-${CJI_NAME}-sequential.log" + "junit-${CJI_NAME}-sequential.xml" +) + +for file in "${JUNIT_SEQUENTIAL_OUTPUTS[@]}"; do + if [ ! -e "$ARTIFACTS_DIR/$file" ]; then + echo "The file $file does not exist. CJI Test(s) may have failed." + exit 1 + fi +done + +if [ "$IQE_PARALLEL_ENABLED" = "true" ]; then + JUNIT_PARALLEL_OUTPUTS=( + "iqe-${CJI_NAME}-parallel.log" + "junit-${CJI_NAME}-parallel.xml" + ) + + for file in "${JUNIT_SEQUENTIAL_OUTPUTS[@]}"; do + if [ ! -e "$ARTIFACTS_DIR/$file" ]; then + echo "The file $file does not exist. CJI Test(s) may have failed." + exit 1 + fi + done +fi + echo "copied artifacts from iqe pod: " ls -l $ARTIFACTS_DIR