Skip to content

Commit 12e4c85

Browse files
DaanDeMeyerbluca
authored andcommitted
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 fe7413d) (cherry picked from commit 4c18caa)
1 parent 92485c8 commit 12e4c85

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/integration-test-wrapper.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ def main() -> None:
133133
[Unit]
134134
Wants=multi-user.target getty-pre.target
135135
Before=getty-pre.target
136+
137+
[Service]
138+
StandardInput=tty
139+
StandardOutput=inherit
140+
StandardError=inherit
141+
TTYReset=yes
142+
TTYVHangup=yes
143+
IgnoreSIGPIPE=no
144+
# bash ignores SIGTERM
145+
KillSignal=SIGHUP
136146
"""
137147
)
138148

0 commit comments

Comments
 (0)