summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-02-11 16:34:54 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-02-14 19:08:45 +0100
commit0c79613a5ef111ae09e1c94a2866f63fbf51c524 (patch)
tree914616ae0c09b8c28c93fbe18c8e23589d6c8588 /test
parent4a98dcf274123190a0ebff2bd223cbc9d11e35f9 (diff)
test: Support comments in --skip/--only files
Strip everything after "#" and spaces before it.
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/run-tests4
1 files changed, 2 insertions, 2 deletions
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