From: Zbigniew Jędrzejewski-Szmek Date: Mon, 30 Mar 2020 19:45:21 +0000 (+0200) Subject: test: optionally print the journal after tests X-Git-Tag: v246-rc1~601^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f1416431b6627b0013d8466c8ae5e315ba27d654;p=thirdparty%2Fsystemd.git 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. --- diff --git a/test/test-functions b/test/test-functions index bf21c6312f7..3f5d8df9667 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