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().
[Service]
Type=oneshot
-ExecStart=/bin/sh -x -c 'systemctl poweroff --no-block'
+ExecStart=/usr/lib/systemd/tests/testdata/units/end.sh
TimeoutStartSec=5m
--- /dev/null
+#!/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
echo "$name OK"
echo "$name" >>/testok
fi
-
- systemd-cat echo "--- $name ---"
- systemd-cat cat "/$name.log"
}
set +x