+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-[Unit]
-Description=TEST-07-PID1
-Wants=basic.target multi-user.target
-After=basic.target
-
-[Service]
-Type=oneshot
-ExecStartPre=rm -f /failed /testok
-ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
-NotifyAccess=all
-# Issue: https://github.com/systemd/systemd/issues/2691
-ExecStop=sh -c 'kill -SEGV $$$$'
-RemainAfterExit=yes
-TimeoutStopSec=270s
integration_tests += [
integration_test_template + {
'name' : fs.name(meson.current_source_dir()),
- 'unit' : files('TEST-07-PID1.service'),
+ 'configuration' : integration_test_template['configuration'] + {
+ 'service' : integration_test_template['configuration']['service'] + {
+ 'NotifyAccess' : 'all',
+ # Issue: https://github.com/systemd/systemd/issues/2691
+ 'ExecStop' : 'sh -c \'kill -SEGV $$$$\'',
+ 'RemainAfterExit' : 'yes',
+ 'TimeoutStopSec' : '270s',
+ },
+ },
},
]
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-[Unit]
-Description=TEST-16-EXTEND-TIMEOUT
-# Testsuite: Assess all other testsuite-*.services worked as expected
-
-Wants=basic.target multi-user.target
-After=basic.target
-
-Wants=success-all.service
-Wants=success-start.service
-Wants=success-runtime.service
-Wants=success-stop.service
-Wants=fail-start.service
-Wants=fail-stop.service
-Wants=fail-runtime.service
-StopWhenUnneeded=yes
-
-[Service]
-ExecStartPre=rm -f /failed /testok
-Type=oneshot
-ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
integration_tests += [
integration_test_template + {
'name' : fs.name(meson.current_source_dir()),
- 'unit' : files('TEST-16-EXTEND-TIMEOUT.service'),
+ 'configuration' : integration_test_template['configuration'] + {
+ 'unit' : integration_test_template['configuration']['unit'] + {
+ 'Wants' : ' '.join([
+ 'success-all.service',
+ 'success-start.service',
+ 'success-runtime.service',
+ 'success-stop.service',
+ 'fail-start.service',
+ 'fail-stop.service',
+ 'fail-runtime.service',
+ ]),
+ 'StopWhenUnneeded' : 'yes',
+ },
+ },
'coredump-exclude-regex' : '/(bash|sleep)$',
},
]
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-[Unit]
-Description=TEST-44-LOG-NAMESPACE
-Wants=basic.target multi-user.target systemd-journald@foobar.socket systemd-journald-varlink@foobar.socket
-After=basic.target systemd-journald@foobar.socket systemd-journald-varlink@foobar.socket
-
-[Service]
-ExecStartPre=rm -f /failed /testok
-ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
-Type=oneshot
integration_tests += [
integration_test_template + {
'name' : fs.name(meson.current_source_dir()),
- 'unit' : files('TEST-44-LOG-NAMESPACE.service'),
+ 'configuration' : integration_test_template['configuration'] + {
+ 'unit' : integration_test_template['configuration']['unit'] + {
+ 'Wants' : ' '.join([
+ 'systemd-journald@foobar.socket',
+ 'systemd-journald-varlink@foobar.socket',
+ ]),
+ 'After' : ' '.join([
+ 'systemd-journald@foobar.socket',
+ 'systemd-journald-varlink@foobar.socket',
+ ]),
+ },
+ },
},
]
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-[Unit]
-Description=TEST-69-SHUTDOWN
-Wants=basic.target multi-user.target
-After=basic.target
-
-ConditionPathExists=/usr/bin/python3
-
-[Service]
-Type=oneshot
-ExecStart=/usr/lib/systemd/tests/testdata/units/TEST-69-SHUTDOWN.py
integration_tests += [
integration_test_template + {
'name' : fs.name(meson.current_source_dir()),
- 'unit' : files('TEST-69-SHUTDOWN.service'),
'configuration' : integration_test_template['configuration'] + {
- 'wants' : '@0@ systemd-user-sessions.service'.format(integration_test_template['configuration']['wants']),
- 'after' : '@0@ systemd-user-sessions.service'.format(integration_test_template['configuration']['after']),
+ 'command' : '/usr/lib/systemd/tests/testdata/units/%N.py',
},
},
]
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-[Unit]
-Description=TEST-82-SOFTREBOOT
-DefaultDependencies=no
-Wants=basic.target multi-user.target
-After=basic.target
-
-[Service]
-Type=oneshot
-ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
-FileDescriptorStoreMax=3
-NotifyAccess=all
integration_tests += [
integration_test_template + {
'name' : fs.name(meson.current_source_dir()),
- 'unit' : files('TEST-82-SOFTREBOOT.service'),
+ 'configuration' : integration_test_template['configuration'] + {
+ 'unit' : integration_test_template['configuration']['unit'] + {
+ 'DefaultDependencies' : 'no',
+ },
+ 'service' : integration_test_template['configuration']['service'] + {
+ 'FileDescriptorStoreMax' : '3',
+ 'NotifyAccess' : 'all',
+ },
+ },
'cmdline' : ['systemd.set_credential=kernelcmdlinecred:uff'],
'storage' : 'persistent',
'vm' : true,
'wants' : 'multi-user.target user@4711.service',
'after' : 'user@4711.service',
'env' : {},
+ 'service' : {},
+ 'unit' : {},
},
'cmdline' : [],
'credentials' : [],
'--exit-code', integration_test['exit-code'].to_string(),
'--coredump-exclude-regex', integration_test['coredump-exclude-regex'],
'--sanitizer-exclude-regex', integration_test['sanitizer-exclude-regex'],
+ '--unit', '@0@.service'.format(integration_test['name'])
]
- if 'unit' in integration_test
- integration_test_args += ['--unit', fs.name(integration_test['unit'])]
- else
- integration_test_args += ['--unit', '@0@.service'.format(integration_test['name'])]
- endif
-
if integration_test['vm']
integration_test_args += ['--vm']
endif
if install_tests
foreach integration_test : integration_tests
- if 'unit' in integration_test
- integration_test_unit = integration_test['unit']
- else
- integration_test_unit_env = []
-
- foreach key, value : integration_test['configuration']['env']
- integration_test_unit_env += [f'@key@=@value@']
- endforeach
-
- integration_test_unit = configure_file(
- input : 'test.service.in',
- output : '@0@.service'.format(integration_test['name']),
- configuration : integration_test['configuration'] + {
- 'env' : ' '.join(integration_test_unit_env)
- },
- )
- endif
-
- if install_tests
- install_data(integration_test_unit, install_dir : testdata_dir / 'units')
- endif
+ integration_test_unit_env = []
+ integration_test_extra_unit_properties = []
+ integration_test_extra_service_properties = []
+
+ foreach key, value : integration_test['configuration']['env']
+ integration_test_unit_env += [f'@key@=@value@']
+ endforeach
+
+ foreach key, value : integration_test['configuration']['unit']
+ integration_test_extra_unit_properties += [f'@key@=@value@']
+ endforeach
+
+ foreach key, value : integration_test['configuration']['service']
+ integration_test_extra_service_properties += [f'@key@=@value@']
+ endforeach
+
+ integration_test_unit = configure_file(
+ input : 'test.service.in',
+ output : '@0@.service'.format(integration_test['name']),
+ configuration : integration_test['configuration'] + {
+ 'env' : ' '.join(integration_test_unit_env),
+ 'unit' : '\n'.join(integration_test_extra_unit_properties),
+ 'service' : '\n'.join(integration_test_extra_service_properties),
+ },
+ )
+
+ install_data(integration_test_unit, install_dir : testdata_dir / 'units')
endforeach
testdata_subdirs = [
Description=%N
Wants=basic.target network.target @wants@
After=basic.target network.target @after@
+@unit@
[Service]
ExecStartPre=rm -f /failed /testok
MemoryAccounting=@memory-accounting@
Environment=SYSTEMD_PAGER= @env@
UnsetEnvironment=JOURNAL_STREAM
+@service@