(e.g. by setting a usable default terminal, suppressing the shutdown after
the test, etc.)
+TEST_MATCH_SUBTEST=subtest
+ If the test makes use of `run_subtests` use this variable to provide
+ a POSIX extended regex to run only subtests matching the expression
+
+TEST_MATCH_TESTCASE=testcase
+ Same as $TEST_MATCH_SUBTEST but for subtests that make use of `run_testcases`
+
The kernel and initrd can be specified with $KERNEL_BIN and $INITRD. (Fedora's
or Debian's default kernel path and initrd are used by default.)
"systemd.unit=testsuite.target"
"systemd.wants=testsuite-$1.service"
"noresume"
+ ${TEST_MATCH_SUBTEST:+"systemd.setenv=TEST_MATCH_SUBTEST=$TEST_MATCH_SUBTEST"}
+ ${TEST_MATCH_TESTCASE:+"systemd.setenv=TEST_MATCH_TESTCASE=$TEST_MATCH_TESTCASE"}
)
if ! get_bool "$INTERACTIVE_DEBUG"; then
"$PATH_TO_INIT"
"systemd.unit=testsuite.target"
"systemd.wants=testsuite-$2.service"
+ ${TEST_MATCH_SUBTEST:+"systemd.setenv=TEST_MATCH_SUBTEST=$TEST_MATCH_SUBTEST"}
+ ${TEST_MATCH_TESTCASE:+"systemd.setenv=TEST_MATCH_TESTCASE=$TEST_MATCH_TESTCASE"}
)
if ! get_bool "$INTERACTIVE_DEBUG"; then
fi
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 ---"
"./$subtest" && _PASSED_TESTS+=("$subtest") || _FAILED_TESTS+=("$subtest")
: "--- $subtest END ---"
fi
for testcase in "${testcases[@]}"; do
+ if [[ -n "${TEST_MATCH_TESTCASE:-}" ]] && ! [[ "$testcase" =~ $TEST_MATCH_TESTCASE ]]; then
+ echo "Skipping $testcase (not matching '$TEST_MATCH_TESTCASE')"
+ continue
+ fi
+
: "+++ $testcase BEGIN +++"
# Note: the subshell here is used purposefully, otherwise we might
# unexpectedly inherit a RETURN trap handler from the called