From: Simon McVittie Date: Wed, 13 Jul 2022 18:02:44 +0000 (+0100) Subject: test: Set PATH or WINEPATH to find dbus-daemon.exe in build-time tests X-Git-Tag: dbus-1.15.0~32^2~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac9d36836ef655779676c270b7d39c8690cef2c8;p=thirdparty%2Fdbus.git test: Set PATH or WINEPATH to find dbus-daemon.exe in build-time tests When building for Windows, either natively or cross-compiling and running tests with Wine, test-autolaunch-win expects to be able to find the just-built dbus-daemon.exe in the PATH. Signed-off-by: Simon McVittie --- diff --git a/test/meson.build b/test/meson.build index 00d0cbfa1..43ae3e934 100644 --- a/test/meson.build +++ b/test/meson.build @@ -61,6 +61,21 @@ if platform_unix test_env.set('DBUS_TEST_DBUS_UUIDGEN', dbus_uuidgen.full_path()) endif +if platform_windows + # test-autolaunch-win relies on being able to find the just-built + # dbus-daemon in the PATH + if build_machine.system().contains('windows') + test_env.prepend('PATH', meson.project_build_root() / 'bus') + else + # Assume we'll use Wine to run tests while cross-compiling + test_env.prepend( + 'WINEPATH', + 'Z:' + meson.project_build_root() / 'bus', + separator: ';', + ) + endif +endif + # Tests in bus/config-parser.c rely on these specific values for XDG_* test_env.set('XDG_DATA_HOME', meson.current_build_dir() / 'XDG_DATA_HOME') test_env.set('XDG_RUNTIME_DIR', meson.current_build_dir() / 'XDG_RUNTIME_DIR')