From 0a23a67cea1c9df3a47a86785d2de54a19fa31da Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 7 Jan 2026 09:41:58 +0100 Subject: [PATCH 1/2] Function analyze_logs_by_logdetective send the logs to logdetective URL. Setting set +e and afterwards set -e does not make sense. In case sending data to logdetective failed, then continue. In case set -e is set up and failed_version function returns non zero status, than script is immediatelly stopped which does not make sense in case we tested all version. Signed-off-by: Petr "Stone" Hracek --- test.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test.sh b/test.sh index 838c4f73..dcbcaa44 100755 --- a/test.sh +++ b/test.sh @@ -43,15 +43,11 @@ run_test_and_analyze_failed_logs() { set +o pipefail if [[ "$ret_code" != "0" ]]; then if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]]; then - set +e analyze_logs_by_logdetective "$tmp_file" - # Let's switch it back - set -e fi fi failed_version "$ret_code" "$dir" rm -f "$tmp_file" - } # This adds backwards compatibility if only single version needs to be testing # In CI we would like to test single version but VERSIONS= means, that nothing is tested From ed3e100fc062fc2fe1f2003f72f29ca7b147e1f1 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Wed, 7 Jan 2026 14:06:08 +0100 Subject: [PATCH 2/2] Add more descriptive message in case we skip tests Signed-off-by: Petr "Stone" Hracek --- test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test.sh b/test.sh index dcbcaa44..38a7a3ff 100755 --- a/test.sh +++ b/test.sh @@ -83,7 +83,7 @@ for dir in ${VERSIONS}; do if [ -x test/run-openshift-remote-cluster ]; then run_test_and_analyze_failed_logs "test/run-openshift-remote-cluster" else - echo "-> Tests for OpenShift 4 are not present. Add run-openshift-remote-cluster script, skipping" + echo "-> Tests for OpenShift 4 for version $dir are not present. Add run-openshift-remote-cluster script, skipping" fi fi @@ -93,7 +93,7 @@ for dir in ${VERSIONS}; do if [ -x test/run-upstream ]; then run_test_and_analyze_failed_logs "test/run-upstream" else - echo "-> Upstream tests are not present, skipping" + echo "-> Upstream tests for version $dir are not present, skipping" fi fi @@ -101,7 +101,7 @@ for dir in ${VERSIONS}; do if [ -x test/run-openshift-pytest ]; then run_test_and_analyze_failed_logs "test/run-openshift-pytest" else - echo "-> OpenShift PyTest tests are not present, skipping" + echo "-> OpenShift PyTest tests for version $dir are not present, skipping" fi fi @@ -109,7 +109,7 @@ for dir in ${VERSIONS}; do if [ -x test/run-pytest ]; then run_test_and_analyze_failed_logs "test/run-pytest" else - echo "-> PyTest tests are not present, skipping" + echo "-> PyTest tests for version $dir are not present, skipping" fi fi