From f1416431b6627b0013d8466c8ae5e315ba27d654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 30 Mar 2020 21:45:21 +0200 Subject: test: optionally print the journal after tests This is hopefully the last bit of functionality from https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/tests/upstream. --- test/test-functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test-functions b/test/test-functions index bf21c6312f..3f5d8df966 100644 --- a/test/test-functions +++ b/test/test-functions @@ -801,6 +801,12 @@ save_journal() { /usr/lib/systemd/systemd-journal-remote \ -o $dest \ --getter="journalctl -o export -D $j" + + if [ -n "${TEST_SHOW_JOURNAL}" ]; then + echo "---- $j ----" + journalctl --no-pager -o short-monotonic --no-hostname --priority=${TEST_SHOW_JOURNAL} -D $j + fi + rm -r $j done -- cgit v1.2.1