diff --git a/hack/run-e2e-conformance-virtual-cluster.sh b/hack/run-e2e-conformance-virtual-cluster.sh index da2c4419d..ae3cd423b 100755 --- a/hack/run-e2e-conformance-virtual-cluster.sh +++ b/hack/run-e2e-conformance-virtual-cluster.sh @@ -405,9 +405,17 @@ if [ -z $SKIP_TEST ]; then export JUNIT_OUTPUT="${root}/${TEST_REPORT_PATH}/conformance-test-report" fi + # Disable exit on error temporarily to gather cluster information + set +e SUITE=./test/conformance hack/run-e2e-conformance.sh + TEST_EXITE_CODE=$? + set -e if [[ -v TEST_REPORT_PATH ]]; then kubectl cluster-info dump --namespaces ${NAMESPACE} --output-directory "${root}/${TEST_REPORT_PATH}/cluster-info" fi + + if [[ $TEST_EXITE_CODE -ne 0 ]]; then + exit $TEST_EXITE_CODE + fi fi diff --git a/hack/run-e2e-conformance-virtual-ocp.sh b/hack/run-e2e-conformance-virtual-ocp.sh index 800ebdb4e..a8ba011dc 100755 --- a/hack/run-e2e-conformance-virtual-ocp.sh +++ b/hack/run-e2e-conformance-virtual-ocp.sh @@ -271,9 +271,17 @@ if [ -z $SKIP_TEST ]; then export JUNIT_OUTPUT="${root}/${TEST_REPORT_PATH}/conformance-test-report" fi + # Disable exit on error temporarily to gather cluster information + set +e SUITE=./test/conformance hack/run-e2e-conformance.sh + TEST_EXITE_CODE=$? + set -e if [[ -v TEST_REPORT_PATH ]]; then kubectl cluster-info dump --namespaces ${NAMESPACE} --output-directory "${root}/${TEST_REPORT_PATH}/cluster-info" fi + + if [[ $TEST_EXITE_CODE -ne 0 ]]; then + exit $TEST_EXITE_CODE + fi fi