diff options
Diffstat (limited to 'test/units/testsuite-02.sh')
-rwxr-xr-x | test/units/testsuite-02.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/units/testsuite-02.sh b/test/units/testsuite-02.sh index ca54fc4018..f0e0f091fd 100755 --- a/test/units/testsuite-02.sh +++ b/test/units/testsuite-02.sh @@ -9,9 +9,17 @@ if ! systemd-detect-virt -qc && [[ "${TEST_CMDLINE_NEWLINE:-}" != bar ]]; then exit 1 fi +# If we're running with TEST_PREFER_NSPAWN=1 limit the set of tests we run +# in QEMU to only those that can't run in a container to avoid running +# the same tests again in a, most likely, very slow environment +if ! systemd-detect-virt -qc && [[ "${TEST_PREFER_NSPAWN:-0}" -ne 0 ]]; then + TESTS_GLOB="test-loop-block" +else + TESTS_GLOB=${TESTS_GLOB:-test-*} +fi + NPROC=$(nproc) MAX_QUEUE_SIZE=${NPROC:-2} -TESTS_GLOB=${TESTS_GLOB:-test-*} mapfile -t TEST_LIST < <(find /usr/lib/systemd/tests/unit-tests/ -maxdepth 1 -type f -name "${TESTS_GLOB}") # reset state |