From 876b1e8477653be03d72d6b9025cee2393667330 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Thu, 18 Dec 2025 17:23:23 +0100 Subject: [PATCH] REGTESTS: fix error when no test are skipped Since commit 1ed2c9d ("REGTESTS: list all skipped tests including 'feature cmd' ones"), the script emits some error when trying to display the list of skipped tests when there are none. No backport needed. --- scripts/run-regtests.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/run-regtests.sh b/scripts/run-regtests.sh index 1229649ee..a07c15dca 100755 --- a/scripts/run-regtests.sh +++ b/scripts/run-regtests.sh @@ -427,11 +427,13 @@ $(grep -E -- "^(----|\* diag)" "$i/LOG") EOF done' sh {} + fi - - echo "########################## Listing skipped tests ####################" - count=$(wc -l < "${TESTDIR}/skipped.log") - cat "${TESTDIR}/skipped.log" | sort -n - echo "Total skipped tests: $count" + echo "########################## Listing skipped tests ####################" + count=0 + if [ -e "${TESTDIR}/skipped.log" ]; then + count=$(wc -l < "${TESTDIR}/skipped.log") + cat "${TESTDIR}/skipped.log" | sort -n + fi + echo "Total skipped tests: $count" fi # if TESTDIR