]> git.ipfire.org Git - thirdparty/dbus.git/commit
cmake: Make intrusive (formerly embedded) tests into a separate option
authorSimon McVittie <smcv@collabora.com>
Mon, 9 Dec 2024 18:16:46 +0000 (18:16 +0000)
committerSimon McVittie <smcv@collabora.com>
Tue, 10 Dec 2024 10:25:51 +0000 (10:25 +0000)
commit41c7570e1ea803e9635d9bcabba5fc221c94e7e6
treeb1a7e11644a93d2e87d7e2b6b646bb451dbf31da
parent9c5b5838f5ff667225a913f97006816e3e401d55
cmake: Make intrusive (formerly embedded) tests into a separate option

Previously, the CMake build enabled tests by default, and enabled both
modular and intrusive (embedded) tests with a single option. This is
a really bad idea if anyone is using CMake-built binaries in production.

DBUS_BUILD_TESTS now enables only the modular tests, which are safe to
enable in production builds.

A new DBUS_ENABLE_INTRUSIVE_TESTS option enables the intrusive test
instrumentation.

To preserve existing test coverage, explicitly enable the intrusive
tests in most CMake-based Gitlab-CI jobs (Debian native, openSUSE native,
Windows).

In jobs that have a mirrored pair of production/debug builds (openSUSE
and Debian mingw32/mingw64 cmake), instead we leave the production
build as-is and only build full test coverage in the debug build.

Co-authored-by: Philip Withnall <philip@tecnocode.co.uk>
Signed-off-by: Simon McVittie <smcv@collabora.com>
.gitlab-ci.yml
CMakeLists.txt
README.cmake
cmake/modules/Macros.cmake
tools/ci-build.sh