From 0c79613a5ef111ae09e1c94a2866f63fbf51c524 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 11 Feb 2025 16:34:54 +0100 Subject: test: Support comments in --skip/--only files Strip everything after "#" and spaces before it. --- test/integration/run-tests | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/run-tests b/test/integration/run-tests index e52214e0a..9399f28e9 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -61,7 +61,7 @@ if [ -n "$TESTTORUN" ]; then CURRENTTRAP="rm -f \"$OUTPUT\"; $CURRENTTRAP" trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM { - if [ "$APT_SKIP_TEST_FILE" ] && grep -qFx "${TESTTORUN##*/}" "$APT_SKIP_TEST_FILE"; then + if [ "$APT_SKIP_TEST_FILE" ] && sed 's/ *#.*//' "$APT_SKIP_TEST_FILE" | grep -qFx "${TESTTORUN##*/}"; then if [ "$MSGLEVEL" -le 2 ]; then printf "${CTEST}Skip Testcase ${CHIGH}${TESTTORUN##*/}${CRESET}" else @@ -117,7 +117,7 @@ FAILED_TESTS="" DIR="$(readlink -f "$(dirname "$0")")" cd "$DIR" if [ -e "$TESTLIST" ]; then - TESTLIST="$(sort < "$TESTLIST" | sed 's#^#./#')" + TESTLIST="$(sort < "$TESTLIST" | sed 's#^#./#;s/ *#.*//')" else TESTLIST="$(find . -mindepth 1 -maxdepth 1 -regex '^\./test-[^/]*$' | sort)" fi -- cgit v1.2.3-70-g09d2