summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2017-04-15 21:06:23 +0100
committerSimon McVittie <smcv@debian.org>2017-04-18 17:20:30 +0100
commit36fcd43005af375eea007becccd50662d3b61fba (patch)
tree1660eea84e0945229f70b2301b4d8e376f73921e /cmake
parent53959c9924a64c7031155ea74159dcacd7eedf7b (diff)
downloaddbus-36fcd43005af375eea007becccd50662d3b61fba.tar.gz
Pass in DBUS_TEST_EXEC via environment, not hard-coded into binaries
This avoids "capturing" the build directory in the built binaries when built with embedded tests, which is good for reproducible builds. See <https://reproducible-builds.org/> for more information. Signed-off-by: Simon McVittie <smcv@debian.org> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100692
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config.h.cmake1
-rw-r--r--cmake/modules/Macros.cmake1
2 files changed, 1 insertions, 1 deletions
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index 335819ed..8305a68a 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -31,7 +31,6 @@
#define TEST_LISTEN "@TEST_LISTEN@"
// test binaries
-#define DBUS_TEST_EXEC "@DBUS_TEST_EXEC@"
#define DBUS_EXEEXT "@EXEEXT@"
/* Some dbus features */
diff --git a/cmake/modules/Macros.cmake b/cmake/modules/Macros.cmake
index 6ca06487..d237521f 100644
--- a/cmake/modules/Macros.cmake
+++ b/cmake/modules/Macros.cmake
@@ -63,6 +63,7 @@ macro(add_test_executable _target _source)
list(APPEND _env "DBUS_FATAL_WARNINGS=1")
list(APPEND _env "DBUS_TEST_DATA=${PREFIX}${CMAKE_BINARY_DIR}/test/data")
list(APPEND _env "DBUS_TEST_DBUS_LAUNCH=${PREFIX}${CMAKE_BINARY_DIR}/bin/dbus-launch${EXEEXT}")
+ list(APPEND _env "DBUS_TEST_EXEC=${PREFIX}${DBUS_TEST_EXEC}")
list(APPEND _env "DBUS_TEST_HOMEDIR=${PREFIX}${CMAKE_BINARY_DIR}/dbus")
set_tests_properties(${_target} PROPERTIES ENVIRONMENT "${_env}")
endmacro(add_test_executable)