Skip to content

Commit 4c18caa

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)
1 parent b629b71 commit 4c18caa

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
@@ -456,6 +456,16 @@ def main() -> None:
456456
[Unit]
457457
Wants=multi-user.target getty-pre.target
458458
Before=getty-pre.target
459+
460+
[Service]
461+
StandardInput=tty
462+
StandardOutput=inherit
463+
StandardError=inherit
464+
TTYReset=yes
465+
TTYVHangup=yes
466+
IgnoreSIGPIPE=no
467+
# bash ignores SIGTERM
468+
KillSignal=SIGHUP
459469
"""
460470
)
461471

0 commit comments

Comments
 (0)