From: Joel Rosdahl Date: Wed, 29 Jul 2026 08:38:30 +0000 (+0200) Subject: test: Report all test suite loading failures before failing X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;ds=sidebyside;p=thirdparty%2Fccache.git test: Report all test suite loading failures before failing --- diff --git a/test/run b/test/run index 3fe93da3..3da5f1ef 100755 --- a/test/run +++ b/test/run @@ -697,14 +697,18 @@ fi export TEST_BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" all_suites="$(sed -En 's/^ *addtest\((.*)\)$/\1/p' $(dirname $0)/CMakeLists.txt)" +load_ok=true for suite in $all_suites; do suite_path="${TEST_BASE_DIR}/suites/${suite}.bash" . "${suite_path}" if [ $? -ne 0 ]; then - echo "Error: Failed to load ${suite_path}" - exit 1 + echo "Error: Failed to load ${suite_path}" >&2 + load_ok=false fi done +if ! $load_ok; then + exit 1 +fi # ---------------------------------------