From 03e22e02accc9b18e8109ddbd4ead6d93e8dba53 Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Fri, 12 Sep 2025 16:07:01 +0200 Subject: [PATCH 1/2] Fix junit report generation Fix the junit report generation for every test run for our e2e test execution Signed-off-by: Francisco Herrera --- tests/e2e/common-operator-integ-suite.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/e2e/common-operator-integ-suite.sh b/tests/e2e/common-operator-integ-suite.sh index f1f4b8a968..25fd618b13 100755 --- a/tests/e2e/common-operator-integ-suite.sh +++ b/tests/e2e/common-operator-integ-suite.sh @@ -231,9 +231,14 @@ if [ "${OLM}" != "true" ] && [ "${SKIP_DEPLOY}" != "true" ]; then fi # shellcheck disable=SC2086 +set +e +# Disable to avoid fail the test run and not generate the report.xml +# We need to catch the exit code to be able to generate the report IMAGE="${HUB}/${IMAGE_BASE}:${TAG}" \ go run github.com/onsi/ginkgo/v2/ginkgo -tags e2e \ ---timeout 60m --junit-report=report.xml ${GINKGO_FLAGS} "${WD}"/... +--timeout 60m --junit-report="${ARTIFACTS}/report.xml" ${GINKGO_FLAGS:-} "${WD}"/... +TEST_EXIT_CODE=$? +set -e if [ "${OLM}" != "true" ] && [ "${SKIP_DEPLOY}" != "true" ]; then if [ "${MULTICLUSTER}" == true ]; then @@ -244,3 +249,6 @@ if [ "${OLM}" != "true" ] && [ "${SKIP_DEPLOY}" != "true" ]; then fi fi + +echo "JUnit report: ${ARTIFACTS}/report.xml" +exit ${TEST_EXIT_CODE} From de98cfdb1bd743e72bff4dd92c576810c5bfed3e Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Fri, 12 Sep 2025 16:25:09 +0200 Subject: [PATCH 2/2] Fix lint Fixing lint error Signed-off-by: Francisco Herrera --- tests/e2e/common-operator-integ-suite.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/common-operator-integ-suite.sh b/tests/e2e/common-operator-integ-suite.sh index 25fd618b13..3fc06c40d0 100755 --- a/tests/e2e/common-operator-integ-suite.sh +++ b/tests/e2e/common-operator-integ-suite.sh @@ -230,10 +230,10 @@ if [ "${OLM}" != "true" ] && [ "${SKIP_DEPLOY}" != "true" ]; then fi fi -# shellcheck disable=SC2086 set +e # Disable to avoid fail the test run and not generate the report.xml # We need to catch the exit code to be able to generate the report +# shellcheck disable=SC2086 IMAGE="${HUB}/${IMAGE_BASE}:${TAG}" \ go run github.com/onsi/ginkgo/v2/ginkgo -tags e2e \ --timeout 60m --junit-report="${ARTIFACTS}/report.xml" ${GINKGO_FLAGS:-} "${WD}"/...