mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
Merge pull request #22804 from mrc0mmand/test-tweaks
A couple of TEST-69 tweaks
This commit is contained in:
commit
a557e61993
@ -13,18 +13,23 @@ _ORIG_NSPAWN="${SYSTEMD_NSPAWN:?}"
|
||||
SYSTEMD_NSPAWN="${STATEDIR:?}/run-nspawn"
|
||||
|
||||
setup_nspawn_root_hook() {
|
||||
cat > "${STATEDIR:?}"/run-nspawn <<-EOF
|
||||
#!/bin/bash
|
||||
exec "${TEST_BASE_DIR:?}"/test-shutdown.py -- "$_ORIG_NSPAWN" "\$@"
|
||||
exit 1
|
||||
EOF
|
||||
cat >"${STATEDIR:?}/run-nspawn" <<EOF
|
||||
#!/bin/bash
|
||||
exec "${TEST_BASE_DIR:?}/test-shutdown.py" -v -- "$_ORIG_NSPAWN" "\$@"
|
||||
exit 1
|
||||
EOF
|
||||
chmod 755 "${STATEDIR:?}"/run-nspawn
|
||||
}
|
||||
|
||||
test_append_files() {
|
||||
local workspace="${1:?}"
|
||||
# prevent shutdown in test suite, the expect script does that manually.
|
||||
rm "${workspace:?}/usr/lib/systemd/tests/testdata/units/end.service"
|
||||
mkdir -p "${workspace:?}/etc/systemd/system/end.service.d"
|
||||
cat >"$workspace/etc/systemd/system/end.service.d/99-override.conf" <<EOF
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/bin/true
|
||||
EOF
|
||||
inst /usr/bin/screen
|
||||
echo "PS1='screen\$WINDOW # '" >>"$workspace/root/.bashrc"
|
||||
echo 'startup_message off' >"$workspace/etc/screenrc"
|
||||
|
@ -4,4 +4,4 @@ Description=TEST-69-SHUTDOWN
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
ExecStart=/bin/true
|
||||
|
Loading…
x
Reference in New Issue
Block a user