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, 20 Nov 2018 18:44:39 +0000 (18:44 +0000)
commit11904a44418cded8bd00bc7e5d631d5796b2d9d0
tree67586c32f2470fd176eb5d8e49947bf8680965e7
parentbbe37154680c48ebd6fd4536982ad0341d338bb3
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