From 715bdcbebe0eef2101ab539ccd853d087a26cc97 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Sat, 11 Jul 2026 00:43:14 +0200 Subject: [PATCH] Treat empty unittest discovery as release skip --- scripts/check-release-integration.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/check-release-integration.sh b/scripts/check-release-integration.sh index e64a76b..ee7dd48 100644 --- a/scripts/check-release-integration.sh +++ b/scripts/check-release-integration.sh @@ -44,11 +44,20 @@ run_step() { run_discovered_tests() { local suite_dir="$1" + local status if ! find "$suite_dir" -type f -name 'test*.py' -print -quit | grep -q .; then echo "No unittest test files found under $suite_dir; skipping." return 0 fi + set +e "$PYTHON" -m unittest discover -s "$suite_dir" + status=$? + set -e + if [[ "$status" == 5 ]]; then + echo "No unittest tests discovered under $suite_dir; skipping." + return 0 + fi + return "$status" } run_step "Validate release refs and installed package metadata"