Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -87,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

Expand All @@ -97,23 +93,23 @@ 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

if [ -n "${TEST_OPENSHIFT_PYTEST}" ]; then
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

if [ -n "${TEST_PYTEST}" ]; then
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

Expand Down