test: Connect test unit to console when running interactively

When running interactively, let's connect the test unit directly
to the console. This enables adding "bash" anywhere within an
integration test to get a shell within the test environment.
This commit is contained in:
Daan De Meyer
2025-03-03 12:35:11 +01:00
parent 070de658a9
commit fe7413d195

View File

@@ -456,6 +456,16 @@ def main() -> None:
[Unit]
Wants=multi-user.target getty-pre.target
Before=getty-pre.target
[Service]
StandardInput=tty
StandardOutput=inherit
StandardError=inherit
TTYReset=yes
TTYVHangup=yes
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
"""
)