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.

(cherry picked from commit fe7413d195)
(cherry picked from commit 4c18caaa75)
This commit is contained in:
Daan De Meyer authored and Luca Boccassi committed 2025-03-05 01:28:35 +00:00
1 parent 92485c89db
commit 12e4c8518e
1 file changed
+10
+10
View File
@@ -133,6 +133,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
"""
)