test: optionally allow to disable user service manager, and disable it on TEST-64

The test triggers many uevents, and running both system and user service
managers make the test slow.
This commit is contained in:
Yu Watanabe 2024-05-31 16:29:00 +09:00
parent 052500a072
commit 7ae191a5ea
3 changed files with 9 additions and 5 deletions

View file

@ -4,7 +4,11 @@ name = fs.name(meson.current_source_dir())
unit = configure_file(
input : files('../test.service.in'),
output : '@0@.service'.format(name),
configuration : integration_test_template['configuration'],
# Disable user service manager by default for performance.
configuration : integration_test_template['configuration'] + {
'wants' : '',
'after' : '',
},
)
foreach testcase : [

View file

@ -286,8 +286,8 @@ integration_test_template = {
'configuration' : {
'memory-accounting' : 'no',
'command' : testdata_dir / 'units/%N.sh',
'wants' : '',
'after' : '',
'wants' : 'multi-user.target user@4711.service',
'after' : 'user@4711.service',
},
'cmdline' : [],
'credentials' : [],

View file

@ -1,8 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=%N
Wants=basic.target network.target multi-user.target user@4711.service @wants@
After=basic.target network.target user@4711.service @after@
Wants=basic.target network.target @wants@
After=basic.target network.target @after@
Before=getty-pre.target
[Service]