]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test: Make environment variables consistent with Autotools
authorSimon McVittie <smcv@collabora.com>
Fri, 24 Jun 2022 14:20:12 +0000 (15:20 +0100)
committerSimon McVittie <smcv@collabora.com>
Wed, 13 Jul 2022 19:36:13 +0000 (20:36 +0100)
DBUS_SESSION_BUS_LISTEN_ADDRESS is the same as in non-test files:
the test data distinguishes between DBUS_SESSION_BUS_LISTEN_ADDRESS,
the real session bus configuration, and TEST_LISTEN, the test-only
configuration.

DBUS_TEST_HOMEDIR and HOME should be in the build directory, not
the source directory.

Signed-off-by: Simon McVittie <smcv@collabora.com>
test/meson.build

index 423707154a4cdb4de7b0b8a37c7a5e6e815857b8..6546f7021689a9eb9531e9c136bd07cbdaeab5dc 100644 (file)
@@ -33,7 +33,6 @@ test_meta_dir = get_option('datadir') / 'installed-tests' / 'dbus'
 test_data_config = configuration_data()
 test_data_config.merge_from(data_config)
 
-test_data_config.set('DBUS_SESSION_BUS_LISTEN_ADDRESS', test_listen)
 test_data_config.set('EXEEXT', exe_ext)
 # / '' to convert \-separated dir to /-separated dir on win32
 test_data_config.set('DBUS_TEST_EXEC', meson.current_build_dir() / '')
@@ -43,11 +42,11 @@ test_data_config.set('DBUS_TEST_DATA', meson.current_build_dir() / 'data')
 test_env = environment()
 
 test_env.set('DBUS_TOP_SRCDIR',     meson.project_source_root())
-test_env.set('DBUS_TEST_HOMEDIR',   meson.project_source_root() / 'dbus')
-test_env.set('HOME',                meson.project_source_root() / 'dbus')
 test_env.set('DBUS_TEST_SRCDIR',    meson.current_source_dir())
 
 test_env.set('DBUS_TOP_BUILDDIR',   meson.project_build_root())
+test_env.set('DBUS_TEST_HOMEDIR',   meson.project_build_root() / 'dbus')
+test_env.set('HOME',                meson.project_build_root() / 'dbus')
 # Tests in bus/config-parser.c rely on this specific value
 test_env.set('DBUS_TEST_BUILDDIR',  meson.current_build_dir())
 test_env.set('DBUS_TEST_EXEC',      meson.current_build_dir())