mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Xml backend tests: Use libgnc-backend-xml-utils instead of sources.
Every test was rebuilding it except for gnc-backend-xml.cpp from scratch, no point in that plus the Address Sanitizer needs the definition of GncBackendXml.
This commit is contained in:
parent
fa119f8d17
commit
f67b53a440
@ -26,40 +26,6 @@ function(add_xml_gtest _TARGET _SOURCE_FILES)
|
|||||||
target_compile_options(${_TARGET} PRIVATE -DU_SHOW_CPLUSPLUS_API=0 -DG_LOG_DOMAIN=\"gnc.backend.xml\")
|
target_compile_options(${_TARGET} PRIVATE -DU_SHOW_CPLUSPLUS_API=0 -DG_LOG_DOMAIN=\"gnc.backend.xml\")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
################################
|
|
||||||
|
|
||||||
set(test_backend_xml_base_SOURCES
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/sixtp-dom-parsers.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/sixtp-dom-generators.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/sixtp-utils.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/sixtp.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/sixtp-stack.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/sixtp-to-dom-parser.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-xml-helper.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
## the xml backend is now a GModule - this test does
|
|
||||||
## not load it as a module and cannot link to it
|
|
||||||
## and remain portable.
|
|
||||||
|
|
||||||
set(test_backend_xml_module_SOURCES
|
|
||||||
${test_backend_xml_base_SOURCES}
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/io-example-account.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/io-gncxml-gen.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/io-gncxml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/io-utils.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-account-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-budget-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-lot-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-book-xml-v2.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml/gnc-pricedb-xml-v2.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set_local_dist(test_backend_xml_DIST_local
|
set_local_dist(test_backend_xml_DIST_local
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
grab-types.pl
|
grab-types.pl
|
||||||
@ -84,8 +50,8 @@ set_local_dist(test_backend_xml_DIST_local
|
|||||||
)
|
)
|
||||||
set(test_backend_xml_DIST ${test_backend_xml_DIST_local} ${test_backend_xml_test_files_DIST} PARENT_SCOPE)
|
set(test_backend_xml_DIST ${test_backend_xml_DIST_local} ${test_backend_xml_test_files_DIST} PARENT_SCOPE)
|
||||||
|
|
||||||
add_xml_test(test-dom-converters1 "${test_backend_xml_base_SOURCES};test-dom-converters1.cpp")
|
add_xml_test(test-dom-converters1 "test-dom-converters1.cpp")
|
||||||
add_xml_test(test-kvp-frames "${test_backend_xml_base_SOURCES};test-kvp-frames.cpp")
|
add_xml_test(test-kvp-frames "test-kvp-frames.cpp")
|
||||||
add_xml_test(test-load-backend test-load-backend.cpp)
|
add_xml_test(test-load-backend test-load-backend.cpp)
|
||||||
add_xml_test(test-load-xml2 test-load-xml2.cpp
|
add_xml_test(test-load-xml2 test-load-xml2.cpp
|
||||||
GNC_TEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/test-files/xml2
|
GNC_TEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/test-files/xml2
|
||||||
@ -96,19 +62,19 @@ add_xml_test(test-load-xml2 test-load-xml2.cpp
|
|||||||
#)
|
#)
|
||||||
|
|
||||||
add_xml_test(test-load-example-account
|
add_xml_test(test-load-example-account
|
||||||
"${test_backend_xml_module_SOURCES};test-load-example-account.cpp"
|
"test-load-example-account.cpp"
|
||||||
GNC_ACCOUNT_PATH=${CMAKE_SOURCE_DIR}/data/accounts/C
|
GNC_ACCOUNT_PATH=${CMAKE_SOURCE_DIR}/data/accounts/C
|
||||||
)
|
)
|
||||||
target_compile_options(test-load-example-account PRIVATE -DU_SHOW_CPLUSPLUS_API=0)
|
target_compile_options(test-load-example-account PRIVATE -DU_SHOW_CPLUSPLUS_API=0)
|
||||||
add_xml_gtest(test-load-save-files gtest-load-save-files.cpp
|
add_xml_gtest(test-load-save-files gtest-load-save-files.cpp
|
||||||
GNC_TEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/test-files/load-save
|
GNC_TEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/test-files/load-save
|
||||||
)
|
)
|
||||||
add_xml_test(test-string-converters "${test_backend_xml_base_SOURCES};test-string-converters.cpp")
|
add_xml_test(test-string-converters "test-string-converters.cpp")
|
||||||
add_xml_test(test-xml-account "${test_backend_xml_module_SOURCES};test-xml-account.cpp;test-file-stuff.cpp")
|
add_xml_test(test-xml-account "test-xml-account.cpp;test-file-stuff.cpp")
|
||||||
add_xml_test(test-xml-commodity "${test_backend_xml_module_SOURCES};test-xml-commodity.cpp;test-file-stuff.cpp")
|
add_xml_test(test-xml-commodity "test-xml-commodity.cpp;test-file-stuff.cpp")
|
||||||
add_xml_test(test-xml-pricedb "${test_backend_xml_module_SOURCES};test-xml-pricedb.cpp;test-file-stuff.cpp")
|
add_xml_test(test-xml-pricedb "test-xml-pricedb.cpp;test-file-stuff.cpp")
|
||||||
add_xml_test(test-xml-transaction "${test_backend_xml_module_SOURCES};test-xml-transaction.cpp;test-file-stuff.cpp")
|
add_xml_test(test-xml-transaction "test-xml-transaction.cpp;test-file-stuff.cpp")
|
||||||
add_xml_test(test-xml2-is-file "${test_backend_xml_module_SOURCES};test-xml2-is-file.cpp"
|
add_xml_test(test-xml2-is-file "test-xml2-is-file.cpp"
|
||||||
GNC_TEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/test-files/xml2)
|
GNC_TEST_FILES=${CMAKE_CURRENT_SOURCE_DIR}/test-files/xml2)
|
||||||
|
|
||||||
set(test-real-data-env
|
set(test-real-data-env
|
||||||
|
Loading…
Reference in New Issue
Block a user