Treat empty unittest discovery as release skip
All checks were successful
Dependency Audit / dependency-audit (push) Successful in 1m28s

This commit is contained in:
2026-07-11 00:43:14 +02:00
parent 060f4da751
commit 715bdcbebe

View File

@@ -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"