summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-30 21:45:21 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-31 12:31:10 +0200
commitf1416431b6627b0013d8466c8ae5e315ba27d654 (patch)
tree3584f508c09f3b97fcabee2340484f3d1d010a3a
parentf9eb2d51dadc730b5de97e4c7780450ec91c0d2a (diff)
downloadsystemd-f1416431b6627b0013d8466c8ae5e315ba27d654.tar.gz
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.
-rw-r--r--test/test-functions6
1 files changed, 6 insertions, 0 deletions
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