From: Frantisek Sumsal Date: Mon, 19 Feb 2024 19:37:31 +0000 (+0100) Subject: test: support TEST_MATCH_* stuff in TEST-23-UNIT-FILE as well X-Git-Tag: v256-rc1~796^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a69ec6fb0241f6a44fa15cd0009790221c23eb4c;p=thirdparty%2Fsystemd.git test: support TEST_MATCH_* stuff in TEST-23-UNIT-FILE as well TEST-23 uses run_subtests_with_signals() which I forgot about when introducing the change. Follow-up for 0efa27bd4b. --- diff --git a/test/units/test-control.sh b/test/units/test-control.sh index c0676786685..0a1611b80ae 100644 --- a/test/units/test-control.sh +++ b/test/units/test-control.sh @@ -86,6 +86,11 @@ run_subtests_with_signals() { _trap_with_sig _handle_signal "$@" for subtest in "${subtests[@]}"; do + if [[ -n "${TEST_MATCH_SUBTEST:-}" ]] && ! [[ "$subtest" =~ $TEST_MATCH_SUBTEST ]]; then + echo "Skipping $subtest (not matching '$TEST_MATCH_SUBTEST')" + continue + fi + : "--- $subtest BEGIN ---" SECONDS=0 "./$subtest" &