summaryrefslogtreecommitdiffstats
path: root/test/test-functions
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2021-06-24 12:13:52 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2021-06-24 17:26:19 +0200
commiteb70d9450c485bcf744d3aa780f1aa6737778df5 (patch)
tree23d327aee10be359c4f5f0fe992f608d206ee965 /test/test-functions
parentMerge pull request #20001 from keszybz/test-path-simplify-less (diff)
downloadsystemd-eb70d9450c485bcf744d3aa780f1aa6737778df5.tar.xz
systemd-eb70d9450c485bcf744d3aa780f1aa6737778df5.zip
test: correctly mask supporting services in tests, take #2
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.
Diffstat (limited to 'test/test-functions')
-rw-r--r--test/test-functions8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test-functions b/test/test-functions
index 3b225cd677..3451e16d9a 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -2416,7 +2416,6 @@ test_create_image() {
(
LOG_LEVEL=5
setup_basic_environment
- mask_supporting_services
)
}
@@ -2467,6 +2466,13 @@ 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
+ dinfo "Masking supporting services"
+ mask_supporting_services
+ fi
+
if [ "$hook_defined" -eq 0 ]; then
test_append_files "${initdir:?}"
fi