gnucash maint: Fix test-import-backend failure.
John Ralls
jralls at code.gnucash.org
Wed Sep 15 13:21:01 EDT 2021
Updated via https://github.com/Gnucash/gnucash/commit/5f8e0347 (commit)
from https://github.com/Gnucash/gnucash/commit/1409c1c5 (commit)
commit 5f8e0347ecc31102da9247d54e200a8d1c4703cc
Author: John Ralls <jralls at ceridwen.us>
Date: Wed Sep 15 10:19:20 2021 -0700
Fix test-import-backend failure.
Linking gnc-engine caused an ODR violation in gnc-date.cpp. Instead
fake qof_log_check() in gtest-import-backend.cpp.
diff --git a/gnucash/import-export/test/CMakeLists.txt b/gnucash/import-export/test/CMakeLists.txt
index 9d348814f..7ac4fc969 100644
--- a/gnucash/import-export/test/CMakeLists.txt
+++ b/gnucash/import-export/test/CMakeLists.txt
@@ -48,7 +48,6 @@ set(gtest_import_backend_INCLUDE_DIRS
)
set(gtest_import_backend_LIBS
- gnc-engine
PkgConfig::GTK3
${Boost_LIBRARIES}
${GMODULE_LDFLAGS}
diff --git a/gnucash/import-export/test/gtest-import-backend.cpp b/gnucash/import-export/test/gtest-import-backend.cpp
index 01f01ac7c..6909a3351 100644
--- a/gnucash/import-export/test/gtest-import-backend.cpp
+++ b/gnucash/import-export/test/gtest-import-backend.cpp
@@ -61,6 +61,13 @@ qof_log_prettify (const char *name)
return name;
}
+// Fake qof_log_check suppresses logging.
+gboolean
+qof_log_check(QofLogModule log_module, QofLogLevel log_level)
+{
+ return FALSE;
+}
+
// fake function from engine-helpers.c
// this is a slightly modified version of the original function
const char *
Summary of changes:
gnucash/import-export/test/CMakeLists.txt | 1 -
gnucash/import-export/test/gtest-import-backend.cpp | 7 +++++++
2 files changed, 7 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list