mirror of
https://github.com/systemd/systemd.git
synced 2024-11-24 02:33:36 +08:00
test: send stdout/stderr of testsuite units to journal & console
to make debugging in CIs slightly easier.
This commit is contained in:
parent
75176c7914
commit
ba7abf79a5
@ -2941,6 +2941,18 @@ test_setup() {
|
||||
mask_supporting_services
|
||||
fi
|
||||
|
||||
# Send stdout/stderr of testsuite-*.service units to both journal and
|
||||
# console to make debugging in CIs easier
|
||||
# Note: we can't use a dropin for `testsuite-.service`, since that also
|
||||
# overrides 'sub-units' of some tests that already use a specific
|
||||
# value for Standard(Output|Error)=
|
||||
# (e.g. test/units/testsuite-66-deviceisolation.service)
|
||||
if ! get_bool "$INTERACTIVE_DEBUG"; then
|
||||
local dropin_dir="${initdir:?}/etc/systemd/system/testsuite-${TESTID:?}.service.d"
|
||||
mkdir -p "$dropin_dir"
|
||||
printf '[Service]\nStandardOutput=journal+console\nStandardError=journal+console' >"$dropin_dir/99-stdout.conf"
|
||||
fi
|
||||
|
||||
if get_bool "$hook_defined"; then
|
||||
test_append_files "${initdir:?}"
|
||||
fi
|
||||
|
@ -9,5 +9,3 @@ Wants=getty-pre.target
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
StandardOutput=tty
|
||||
StandardError=tty
|
||||
|
@ -5,6 +5,4 @@ Description=TEST-35-LOGIN
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
Type=oneshot
|
||||
|
@ -5,6 +5,4 @@ Description=TEST-45-TIMEDATE
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
Type=oneshot
|
||||
|
@ -6,5 +6,3 @@ Description=TEST-64-UDEV
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
Type=oneshot
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
|
@ -5,6 +5,4 @@ Description=TEST-71-HOSTNAME
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
Type=oneshot
|
||||
|
@ -5,6 +5,4 @@ Description=TEST-73-LOCALE
|
||||
[Service]
|
||||
ExecStartPre=rm -f /failed /testok
|
||||
ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
Type=oneshot
|
||||
|
Loading…
Reference in New Issue
Block a user