dbus-cpp: Changes to tests

- Apply a patch that should make a possibly-flaky test more verbose, to ease with debugging.
- Disable the executor test suite, due to a spurious memory corruption in Executor.TimeoutsAreHandledCorrectly.
This commit is contained in:
OPNA2608
2025-10-15 12:08:34 +02:00
parent 9e32dc6ddb
commit 6ef09c0005

View File

@@ -2,10 +2,12 @@
stdenv, stdenv,
lib, lib,
fetchFromGitLab, fetchFromGitLab,
fetchpatch2,
gitUpdater, gitUpdater,
testers, testers,
boost186, boost186,
cmake, cmake,
ctestCheckHook,
dbus, dbus,
doxygen, doxygen,
graphviz, graphviz,
@@ -35,6 +37,16 @@ stdenv.mkDerivation (finalAttrs: {
"examples" "examples"
]; ];
patches = [
# Provide more information when there's an issue in AsyncExecutionLoadTest.RepeatedlyInvokingAnAsyncFunctionWorks
# Remove when version > 5.0.5
(fetchpatch2 {
name = "0001-dbus-cpp-tests-async_execution_load_test-Print-received-error-on-DBus-method-failure.name";
url = "https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/commit/8390ce83153c2ae29f21afd2bf5e79e88c59e6d9.diff";
hash = "sha256-js2nXT7eG9dcX+yoFMNRVlamQxsbJclmKTX6/5RxxM4=";
})
];
postPatch = '' postPatch = ''
substituteInPlace doc/CMakeLists.txt \ substituteInPlace doc/CMakeLists.txt \
--replace-fail 'DESTINATION share/''${CMAKE_PROJECT_NAME}/doc' 'DESTINATION ''${CMAKE_INSTALL_DOCDIR}' --replace-fail 'DESTINATION share/''${CMAKE_PROJECT_NAME}/doc' 'DESTINATION ''${CMAKE_INSTALL_DOCDIR}'
@@ -71,6 +83,7 @@ stdenv.mkDerivation (finalAttrs: {
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
ctestCheckHook
dbus dbus
]; ];
@@ -87,6 +100,12 @@ stdenv.mkDerivation (finalAttrs: {
# DBus, parallelism messes with communication # DBus, parallelism messes with communication
enableParallelChecking = false; enableParallelChecking = false;
disabledTests = [
# Possible memory corruption in Executor.TimeoutsAreHandledCorrectly
# https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/issues/10
"executor_test"
];
preFixup = '' preFixup = ''
moveToOutput libexec/examples $examples moveToOutput libexec/examples $examples
''; '';