]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: optionally print the journal after tests
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 30 Mar 2020 19:45:21 +0000 (21:45 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Mar 2020 10:31:10 +0000 (12:31 +0200)
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

index bf21c6312f7730590bb471eee0b21f211807386c..3f5d8df9667a8794d33823af110ab6bc23f41c6f 100644 (file)
@@ -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