]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: Connect test unit to console when running interactively 36586/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 3 Mar 2025 11:35:11 +0000 (12:35 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 3 Mar 2025 11:35:11 +0000 (12:35 +0100)
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.

test/integration-test-wrapper.py

index e9c5a295bc455498e83eb21ac003fc2b7613b94e..55eca9f75aa7cbc40cb46c6bb801cf035218cefe 100755 (executable)
@@ -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
             """
         )