Due to a little misunderstanding the last patch doesn't work as
expected, since test_create_image() is called only for the first image
(usually TEST-01-BASIC), and all subsequent images are then (possibly)
modified with test_append_files().
Follow-up to
179ca4d2b1b5579014773a128462475f99b7a91b.
# shellcheck source=test/test-functions
. "${TEST_BASE_DIR:?}/test-functions"
-# Explicitly override the default test_create_image() function to avoid the
-# call to mask_supporting_services(), since we want to run them in TEST-01-BASIC
-test_create_image() {
- create_empty_image_rootdir
-
- # Create what will eventually be our root filesystem onto an overlay
- (
- LOG_LEVEL=5
- setup_basic_environment
- )
-}
-
test_append_files() {
# install tests manually so the test is functional even when -Dinstall-tests=false
local dst="${1:?}/usr/lib/systemd/tests/testdata/units/"
(
LOG_LEVEL=5
setup_basic_environment
- mask_supporting_services
)
}
fi
mount_initdir
+ # We want to test all services in TEST-01-BASIC, but mask them in
+ # all other tests
+ if [[ "${TESTID:?}" != "01" ]]; then
+ dinfo "Masking supporting services"
+ mask_supporting_services
+ fi
+
if [ "$hook_defined" -eq 0 ]; then
test_append_files "${initdir:?}"
fi