1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-18 10:04:04 +03:00

test: Only plug in integration-test-setup.sh in interactive mode

If we're not running interactively, there's no point in the features
from integration-test-setup.sh which are intended for interactive
development and debugging so lets skip adding it in that case.

(cherry picked from commit 794d456cf402a35290d6562c21f0ff846511026c)
This commit is contained in:
Daan De Meyer 2025-01-09 11:28:15 +01:00 committed by Luca Boccassi
parent 16ae6d001d
commit a4ae723295
2 changed files with 9 additions and 2 deletions

View File

@ -459,6 +459,15 @@ def main() -> None:
"""
)
if sys.stderr.isatty():
dropin += textwrap.dedent(
"""
[Service]
ExecStartPre=/usr/lib/systemd/tests/testdata/integration-test-setup.sh setup
ExecStopPost=/usr/lib/systemd/tests/testdata/integration-test-setup.sh finalize
"""
)
cmd = [
args.mkosi,
'--directory', os.fspath(args.meson_source_dir),

View File

@ -7,9 +7,7 @@ Before=getty-pre.target
[Service]
ExecStartPre=rm -f /failed /testok
ExecStartPre=/usr/lib/systemd/tests/testdata/integration-test-setup.sh setup
ExecStart=@command@
ExecStopPost=/usr/lib/systemd/tests/testdata/integration-test-setup.sh finalize
Type=oneshot
MemoryAccounting=@memory-accounting@
StateDirectory=%N