summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@canonical.com>2020-04-26 11:19:55 -0400
committerLennart Poettering <lennart@poettering.net>2020-04-30 22:33:47 +0200
commitcad67279067b03e64df5421b9a1e9fef077863d9 (patch)
tree08599dc31f480ac2c0e7a43e576230f0a488dd8b
parenta8332698d794522104f2131e294ab336d7726767 (diff)
downloadsystemd-cad67279067b03e64df5421b9a1e9fef077863d9.tar.gz
test: find path for systemd-journal-remote
As Debian/Ubuntu use /lib/systemd instead of /usr/lib/systemd, add systemd-journal-remote to the list of programs that test-functions detects the correct path to, and replace its direct usage with $SYSTEMD_JOURNAL_REMOTE Also use $JOURNALCTL instead of journalctl. Also minor correction in install_plymouth() to look in /lib/... as well as /usr/lib/... and /etc/...
-rw-r--r--test/test-functions9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/test-functions b/test/test-functions
index 8389623c20..0b56eb226f 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -38,6 +38,7 @@ fi
PATH_TO_INIT=$ROOTLIBDIR/systemd
[ "$SYSTEMD_JOURNALD" ] || SYSTEMD_JOURNALD=$(which -a $BUILD_DIR/systemd-journald $ROOTLIBDIR/systemd-journald 2>/dev/null | grep '^/' -m1)
+[ "$SYSTEMD_JOURNAL_REMOTE" ] || SYSTEMD_JOURNAL_REMOTE=$(which -a $BUILD_DIR/systemd-journal-remote $ROOTLIBDIR/systemd-journal-remote 2>/dev/null | grep '^/' -m1)
[ "$SYSTEMD" ] || SYSTEMD=$(which -a $BUILD_DIR/systemd $ROOTLIBDIR/systemd 2>/dev/null | grep '^/' -m1)
[ "$SYSTEMD_NSPAWN" ] || SYSTEMD_NSPAWN=$(which -a $BUILD_DIR/systemd-nspawn systemd-nspawn 2>/dev/null | grep '^/' -m1)
[ "$JOURNALCTL" ] || JOURNALCTL=$(which -a $BUILD_DIR/journalctl journalctl 2>/dev/null | grep '^/' -m1)
@@ -800,13 +801,13 @@ save_journal() {
fi
for j in $1/*; do
- /usr/lib/systemd/systemd-journal-remote \
+ $SYSTEMD_JOURNAL_REMOTE \
-o $dest \
- --getter="journalctl -o export -D $j"
+ --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
+ $JOURNALCTL --no-pager -o short-monotonic --no-hostname --priority=${TEST_SHOW_JOURNAL} -D $j
fi
rm -r $j
@@ -906,7 +907,7 @@ install_plymouth() {
# /usr/libexec/plymouth/plymouth-populate-initrd -t $initdir
# dracut_install plymouth plymouthd
# else
- rm -f $initdir/{usr/lib,etc}/systemd/system/plymouth* $initdir/{usr/lib,etc}/systemd/system/*/plymouth*
+ rm -f $initdir/{usr/lib,lib,etc}/systemd/system/plymouth* $initdir/{usr/lib,lib,etc}/systemd/system/*/plymouth*
# fi
}