test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR
authorFilipe Brandenburger <filbranden@google.com>
Wed, 12 Sep 2018 07:23:40 +0000 (00:23 -0700)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 20 Sep 2018 20:22:45 +0000 (21:22 +0100)
commit9686b30bcda81fbc685b18bc1e6722d9d79b570f
treeeb54676cc518153df125530c4b3de2eecbbe7b39
parentf82e700c85f08d8cf781e6536104872da0166d0a
test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR

This makes it so that tests no longer need to know the absolute paths to the
source and build dirs, instead using the systemd-runtest.env file to get these
paths when running from the build tree.

Confirmed that test-catalog works on `ninja test`, when called standalone and
also when the environment file is not present, in which case it will use the
installed location under /usr/lib/systemd/catalog.

The location can now also be overridden for this test by setting the
$SYSTEMD_CATALOG_DIR environment variable.

(cherry picked from commit 49cdae63d168b2fe0e19f9f090b90d79de3c39bb)

Gbp-Pq: Name test-use-builddir-systemd-runtest.env-for-SYSTEMD_CATALOG.patch
meson.build
src/journal/test-catalog.c
src/shared/tests.c
src/shared/tests.h
src/test/meson.build