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)
committerMichael Biebl <biebl@debian.org>
Sun, 28 Oct 2018 12:02:18 +0000 (12:02 +0000)
commit2c6686f51bfeadea152f1c532f9eff4e1c4d09b2
treeaadee8bf56285512f8eaa20248b6e7591e864e1a
parent33e5b3711bc13dfc937f4e158e0c81eb212d2c99
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