]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test: Redirect XDG_DATA_HOME, XDG_DATA_DIRS somewhere harmless
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 15 Feb 2017 11:43:51 +0000 (11:43 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 20 Feb 2017 18:05:26 +0000 (18:05 +0000)
We want to be able to use <standard_system_datadirs/> in tests
without picking up someone else's .service files.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99825
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test/Makefile.am

index 7c712fa240119a137280d6ee15d1fcefbd53855d..61693982809db6acbd6811a8f73a6f6f5ec36ccc 100644 (file)
@@ -227,6 +227,8 @@ installable_test_meta_with_config = \
 
 installcheck_tests =
 installcheck_environment = \
+       export XDG_DATA_HOME=@abs_top_builddir@/test/XDG_DATA_HOME; \
+       export XDG_DATA_DIRS=@abs_top_builddir@/test/XDG_DATA_DIRS:$(DESTDIR)$(datadir); \
        export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
        export DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT); \
        export DBUS_TEST_DBUS_LAUNCH=$(DESTDIR)$(bindir)/dbus-launch$(EXEEXT); \
@@ -237,6 +239,8 @@ installcheck_environment = \
        ${NULL}
 
 AM_TESTS_ENVIRONMENT = \
+       export XDG_DATA_HOME=@abs_top_builddir@/test/XDG_DATA_HOME; \
+       export XDG_DATA_DIRS=@abs_top_builddir@/test/XDG_DATA_DIRS; \
        export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \
        export DBUS_FATAL_WARNINGS=1; \
        export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \