]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make masking of supplementary services configurable
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 16 Feb 2022 19:29:14 +0000 (20:29 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 19 Jun 2022 09:27:41 +0000 (11:27 +0200)
test/TEST-01-BASIC/test.sh
test/test-functions

index a790cd78ac0fe3a96ce8e6f2b7a03f2ca3e74c8a..cc6d0651c145065f57c98ffc2921bec603bcd93b 100755 (executable)
@@ -6,6 +6,7 @@ TEST_DESCRIPTION="Basic systemd setup"
 IMAGE_NAME="basic"
 RUN_IN_UNPRIVILEGED_CONTAINER=${RUN_IN_UNPRIVILEGED_CONTAINER:-yes}
 TEST_REQUIRE_INSTALL_TESTS=0
+TEST_SUPPORTING_SERVICES_SHOULD_BE_MASKED=0
 
 # shellcheck source=test/test-functions
 . "${TEST_BASE_DIR:?}/test-functions"
index b3844f246c6d93c3fb6dd824944aa16c14c0a2a5..ae1d0aff622443cf6752e246feaa307ceb192785 100644 (file)
@@ -40,6 +40,7 @@ IMAGE_NAME=${IMAGE_NAME:-default}
 STRIP_BINARIES="${STRIP_BINARIES:-yes}"
 TEST_REQUIRE_INSTALL_TESTS="${TEST_REQUIRE_INSTALL_TESTS:-1}"
 TEST_PARALLELIZE="${TEST_PARALLELIZE:-0}"
+TEST_SUPPORTING_SERVICES_SHOULD_BE_MASKED="${TEST_SUPPORTING_SERVICES_SHOULD_BE_MASKED:-1}"
 LOOPDEV=
 
 # Simple wrapper to unify boolean checks.
@@ -2934,9 +2935,8 @@ test_setup() {
         fi
 
         mount_initdir
-        # We want to test all services in TEST-01-BASIC, but mask them in
-        # all other tests
-        if [[ "${TESTID:?}" != "01" ]]; then
+
+        if get_bool "${TEST_SUPPORTING_SERVICES_SHOULD_BE_MASKED}"; then
             dinfo "Masking supporting services"
             mask_supporting_services
         fi