1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-27 01:57:35 +03:00

test: verify json format passed through varlink

This drops logs of failed unit tests in TEST-02-UNITTESTS from the journal,
as the expected logs from test-varlink-idl makes the post script fail.
Saving logs in journal is simply noisy, and we will output anyway after
qemu or nspawn finished by check_result_{qemu,nspawn}_unittests().
This commit is contained in:
Yu Watanabe 2023-11-27 06:26:07 +09:00
parent fa316d553c
commit 038e455462
3 changed files with 11 additions and 4 deletions

View File

@ -7,5 +7,5 @@ OnFailureJobMode=replace-irreversibly
[Service]
Type=oneshot
ExecStart=/bin/sh -x -c 'systemctl poweroff --no-block'
ExecStart=/usr/lib/systemd/tests/testdata/units/end.sh
TimeoutStartSec=5m

10
test/units/end.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eux
set -o pipefail
(! journalctl -q -o short-monotonic --grep "didn't pass validation" >>/failed)
systemctl poweroff --no-block
exit 0

View File

@ -63,9 +63,6 @@ report_result() {
echo "$name OK"
echo "$name" >>/testok
fi
systemd-cat echo "--- $name ---"
systemd-cat cat "/$name.log"
}
set +x