From e2d3a907bd26be7ddf36e88e9764f9cf648df85a Mon Sep 17 00:00:00 2001 From: larsevj Date: Wed, 25 Sep 2024 14:27:10 +0200 Subject: [PATCH] Run all tests in test_komodo before returning error --- ci/testkomodo.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ci/testkomodo.sh b/ci/testkomodo.sh index c0f63d08338..2a551fbea29 100755 --- a/ci/testkomodo.sh +++ b/ci/testkomodo.sh @@ -40,23 +40,41 @@ start_tests () { pushd ${CI_TEST_ROOT}/tests/ert + set +e + pytest --eclipse-simulator -n logical --show-capture=stderr -v --max-worker-restart 0 \ -m "not limit_memory and not requires_window_manager" --benchmark-disable --dist loadgroup + retun_code_0=$? pytest --eclipse-simulator -v --mpl \ -m "not limit_memory and requires_window_manager" --benchmark-disable + retun_code_1=$? # Restricting the number of threads utilized by numpy to control memory consumption, as some tests evaluate memory usage and additional threads increase it. export OMP_NUM_THREADS=1 pytest -n 2 --durations=0 -m "limit_memory" --memray + retun_code_2=$? unset OMP_NUM_THREADS basetemp=$(mktemp -d -p $_ERT_TESTS_SHARED_TMP) pytest --timeout=3600 -v --$_ERT_TESTS_QUEUE_SYSTEM --basetemp="$basetemp" unit_tests/scheduler + retun_code_3=$? rm -rf "$basetemp" || true popd run_ert_with_opm + retun_code_4=$? + + set -e + + # We error if one or more returncodes are nonzero + for code in $return_code_0 $return_code_1 $return_code_2 $return_code_3 $return_code_4; do + if [ $code -ne 0 ]; then + echo "One or more tests failed." + return 1 + fi + done + }