diff --git a/tests/e2e/common-operator-integ-suite.sh b/tests/e2e/common-operator-integ-suite.sh index f1f4b8a96..3fc06c40d 100755 --- a/tests/e2e/common-operator-integ-suite.sh +++ b/tests/e2e/common-operator-integ-suite.sh @@ -230,10 +230,15 @@ if [ "${OLM}" != "true" ] && [ "${SKIP_DEPLOY}" != "true" ]; then fi fi +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=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}