summaryrefslogtreecommitdiff
path: root/test/Makefile.am
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-09-12 13:24:28 +0100
committerSimon McVittie <smcv@collabora.com>2022-10-05 10:24:24 +0100
commit37e01259435a28b11a087867ea199cd09f0a5cff (patch)
tree0bd90c99191cab543b70036ea7ddb4584de3910b /test/Makefile.am
parentd633016f7340f83142f19f4bcac08c57e1f2fd2f (diff)
downloaddbus-37e01259435a28b11a087867ea199cd09f0a5cff.tar.gz
test: Export G_TEST_BUILDDIR, G_TEST_SRCDIR
These environment variables are used by GLib's g_test_build_filename() and related convenience functions, which make it easier for unit tests to find data files in a way that works for both build-time tests and "as-installed" tests. During "as-installed" testing, both variables will normally be unset, and GLib uses the directory containing the executable. In most cases that results in the right thing happening, and this will also be true for dbus, since we install the test executables in ${libexecdir}/installed-tests, helper executables in the same place, and test data in ${libexecdir}/installed-tests/data. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/Makefile.am')
-rw-r--r--test/Makefile.am2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am
index 11642211..659aead3 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -439,6 +439,8 @@ AM_TESTS_ENVIRONMENT = \
export DBUS_TEST_EXEC=@abs_top_builddir@/test; \
export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \
export DBUS_TEST_UNINSTALLED=1; \
+ export G_TEST_BUILDDIR=@abs_builddir@; \
+ export G_TEST_SRCDIR=@abs_srcdir@; \
export HOME=@abs_top_builddir@/dbus; \
$(NULL)