]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: fix error when no test are skipped
authorWilliam Lallemand <wlallemand@irq6.net>
Thu, 18 Dec 2025 16:23:23 +0000 (17:23 +0100)
committerWilliam Lallemand <wlallemand@irq6.net>
Thu, 18 Dec 2025 16:26:50 +0000 (17:26 +0100)
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

index 1229649ee624bd6d7ae133f5b135103ef9358059..a07c15dcadc01e4121854ab00eede3cc3bce0022 100755 (executable)
@@ -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