diff options
Diffstat (limited to 'test/TEST-69-SHUTDOWN')
-rw-r--r-- | test/TEST-69-SHUTDOWN/TEST-69-SHUTDOWN.service | 12 | ||||
-rw-r--r-- | test/TEST-69-SHUTDOWN/meson.build | 12 | ||||
-rwxr-xr-x | test/TEST-69-SHUTDOWN/test.sh | 2 |
3 files changed, 25 insertions, 1 deletions
diff --git a/test/TEST-69-SHUTDOWN/TEST-69-SHUTDOWN.service b/test/TEST-69-SHUTDOWN/TEST-69-SHUTDOWN.service new file mode 100644 index 0000000..1467f71 --- /dev/null +++ b/test/TEST-69-SHUTDOWN/TEST-69-SHUTDOWN.service @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +[Unit] +Description=TEST-69-SHUTDOWN +Wants=basic.target multi-user.target +After=basic.target +Before=getty-pre.target + +ConditionPathExists=/usr/bin/python3 + +[Service] +Type=oneshot +ExecStart=/usr/lib/systemd/tests/testdata/units/TEST-69-SHUTDOWN.py diff --git a/test/TEST-69-SHUTDOWN/meson.build b/test/TEST-69-SHUTDOWN/meson.build new file mode 100644 index 0000000..c1b1ab5 --- /dev/null +++ b/test/TEST-69-SHUTDOWN/meson.build @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +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']), + }, + }, +] diff --git a/test/TEST-69-SHUTDOWN/test.sh b/test/TEST-69-SHUTDOWN/test.sh index 0e12857..0229d89 100755 --- a/test/TEST-69-SHUTDOWN/test.sh +++ b/test/TEST-69-SHUTDOWN/test.sh @@ -17,7 +17,7 @@ SYSTEMD_NSPAWN="${STATEDIR:?}/run-nspawn" setup_nspawn_root_hook() { cat >"${STATEDIR:?}/run-nspawn" <<EOF #!/bin/bash -exec "${TEST_BASE_DIR:?}/test-shutdown.py" -v -- "$_ORIG_NSPAWN" "\$@" +exec "${TEST_BASE_DIR:?}/test-shutdown.py" -v -- "$_ORIG_NSPAWN" --background= "\$@" exit 1 EOF chmod 755 "${STATEDIR:?}"/run-nspawn |