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>
Tue, 25 Sep 2018 14:11:12 +0000 (15:11 +0100)
commite0c3f8d706739ab105528b188655f0101ca60f4c
tree4a8de778e4b4d53512987da44bfbb370fe7e2c26
parent108ba31c638eaed87366866d98d38715489ec7d0
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