mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-22 08:57:17 -06:00
engine/test - move guile related tests to bindings
This commit is contained in:
parent
02511401b7
commit
c46c9682eb
@ -38,7 +38,7 @@
|
||||
#include "gnc-engine-guile.h"
|
||||
#include "policy.h"
|
||||
#include "SX-book.h"
|
||||
#include "gnc-kvm-guile.h"
|
||||
#include "gnc-kvp-guile.h"
|
||||
#include "glib-guile.h"
|
||||
|
||||
#include "gncAddress.h"
|
||||
|
@ -11,7 +11,7 @@ extern "C"
|
||||
#include "guile-mappings.h"
|
||||
#include "gnc-engine-guile.h"
|
||||
#include "gnc-guile-utils.h"
|
||||
#include "gnc-kvm-guile.h"
|
||||
#include "gnc-kvp-guile.h"
|
||||
}
|
||||
|
||||
/* NOTE: There are some problems with this approach. Currently,
|
||||
|
@ -1,33 +1,130 @@
|
||||
set(scm_test_SCHEME
|
||||
test-scm-utilities.scm
|
||||
test-module-deprecation.scm
|
||||
)
|
||||
# C(++) tests requiring a proper guile environment set up
|
||||
|
||||
set(ENGINE_TEST_INCLUDE_DIRS
|
||||
${CMAKE_SOURCE_DIR}/libgnucash/backend/xml
|
||||
${CMAKE_SOURCE_DIR}/libgnucash/engine
|
||||
${CMAKE_SOURCE_DIR}/libgnucash/engine/test-core
|
||||
${CMAKE_BINARY_DIR}/common # for config.h
|
||||
${CMAKE_SOURCE_DIR}/common/test-core # for unittest-support.h
|
||||
${CMAKE_SOURCE_DIR}/bindings/guile # for gnc-engine-guile.h
|
||||
${GLIB2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(ENGINE_TEST_LIBS
|
||||
gncmod-engine
|
||||
gncmod-test-engine
|
||||
test-core
|
||||
gnucash-guile
|
||||
${LIBXML2_LDFLAGS}
|
||||
-lm)
|
||||
|
||||
gnc_add_test_with_guile(test-scm-query test-scm-query.cpp ENGINE_TEST_INCLUDE_DIRS ENGINE_TEST_LIBS)
|
||||
|
||||
|
||||
# Scheme tests
|
||||
|
||||
|
||||
set(engine_test_SCHEME
|
||||
test-create-account.scm
|
||||
)
|
||||
|
||||
#list(APPEND engine_test_SCHEME test-scm-query-import.scm) Fails
|
||||
|
||||
set(GUILE_DEPENDS
|
||||
scm-gnc-module
|
||||
scm-app-utils
|
||||
scm-engine
|
||||
scm-srfi64-extras
|
||||
scm-deprecated-gnucash-deprecated-module
|
||||
scm-deprecated-gnucash-superseded-module
|
||||
)
|
||||
scm-gnc-module
|
||||
scm-app-utils
|
||||
scm-engine)
|
||||
|
||||
gnc_add_scheme_test_targets(scm-test-engine-extras
|
||||
"test-engine-extras.scm"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS}"
|
||||
FALSE
|
||||
)
|
||||
|
||||
# Module interfaces deprecated in 4.x, will be removed for 5.x
|
||||
gnc_add_scheme_deprecated_module ("gnucash engine test test-extras" "tests test-engine-extras" "scm-test-engine-extras" "")
|
||||
|
||||
gnc_add_scheme_test_targets(scm-test-engine
|
||||
"${engine_test_SCHEME}"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS};scm-test-engine-extras"
|
||||
FALSE
|
||||
)
|
||||
|
||||
|
||||
add_dependencies(check scm-test-engine)
|
||||
gnc_add_scheme_tests("${engine_test_SCHEME}")
|
||||
|
||||
if (HAVE_SRFI64)
|
||||
gnc_add_scheme_test_targets (scm-srfi64-extras
|
||||
"srfi64-extras.scm"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS};scm-test-engine-extras;scm-srfi64-extras"
|
||||
FALSE
|
||||
)
|
||||
|
||||
# Module interfaces deprecated in 4.x, will be removed for 5.x
|
||||
gnc_add_scheme_deprecated_module ("gnucash engine test srfi64-extras" "tests srfi64-extras" "scm-srfi64-extras" "")
|
||||
|
||||
set (scm_tests_with_srfi64_SOURCES
|
||||
test-business-core.scm
|
||||
)
|
||||
|
||||
gnc_add_scheme_test_targets (scm-test-with-srfi64
|
||||
"${scm_tests_with_srfi64_SOURCES}"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS};scm-test-engine-extras;scm-srfi64-extras;gncmod-engine"
|
||||
FALSE
|
||||
)
|
||||
|
||||
gnc_add_scheme_tests("${scm_tests_with_srfi64_SOURCES}")
|
||||
add_dependencies(check scm-srfi64-extras)
|
||||
endif (HAVE_SRFI64)
|
||||
|
||||
|
||||
set(test_scm_SCHEME
|
||||
test-scm-utilities.scm
|
||||
test-module-deprecation.scm
|
||||
)
|
||||
|
||||
set(GUILE_DEPENDS
|
||||
scm-gnc-module
|
||||
scm-app-utils
|
||||
scm-engine
|
||||
scm-srfi64-extras
|
||||
scm-deprecated-gnucash-deprecated-module
|
||||
scm-deprecated-gnucash-superseded-module
|
||||
)
|
||||
|
||||
if (HAVE_SRFI64)
|
||||
gnc_add_scheme_test_targets(scm-test-scm
|
||||
"${scm_test_SCHEME}"
|
||||
"${test_scm_SCHEME}"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS}"
|
||||
FALSE
|
||||
)
|
||||
|
||||
gnc_add_scheme_tests("${scm_test_SCHEME}")
|
||||
gnc_add_scheme_tests("${test_scm_SCHEME}")
|
||||
|
||||
endif (HAVE_SRFI64)
|
||||
|
||||
|
||||
|
||||
set(test_engine_SCHEME_DIST
|
||||
srfi64-extras.scm
|
||||
test-create-account.scm
|
||||
test-engine-extras.scm
|
||||
test-scm-query-import.scm
|
||||
test-business-core.scm
|
||||
)
|
||||
|
||||
set_dist_list(test_guile_DIST
|
||||
CMakeLists.txt
|
||||
${scm_test_SCHEME}
|
||||
)
|
||||
CMakeLists.txt
|
||||
test-scm-query.cpp
|
||||
${test_engine_SCHEME_DIST}
|
||||
${test_scm_SCHEME}
|
||||
)
|
||||
|
||||
# Define two imaginary deprecated guile modules to test the compat file generation code
|
||||
gnc_add_scheme_deprecated_module ("gnucash deprecated-module" "" "" "")
|
||||
|
@ -6,11 +6,10 @@ set(ENGINE_TEST_INCLUDE_DIRS
|
||||
${CMAKE_SOURCE_DIR}/libgnucash/engine/test-core
|
||||
${CMAKE_BINARY_DIR}/common # for config.h
|
||||
${CMAKE_SOURCE_DIR}/common/test-core # for unittest-support.h
|
||||
${CMAKE_SOURCE_DIR}/bindings/guile # for gnc-engine-guile.h
|
||||
${GLIB2_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(ENGINE_TEST_LIBS gncmod-engine gncmod-test-engine test-core gnucash-guile ${LIBXML2_LDFLAGS} -lm)
|
||||
set(ENGINE_TEST_LIBS gncmod-engine gncmod-test-engine test-core ${LIBXML2_LDFLAGS} -lm)
|
||||
|
||||
macro(add_engine_test _TARGET _SOURCE_FILES)
|
||||
gnc_add_test(${_TARGET} "${_SOURCE_FILES}" ENGINE_TEST_INCLUDE_DIRS ENGINE_TEST_LIBS)
|
||||
@ -202,66 +201,6 @@ gtest-qofquerycore.cpp)
|
||||
gnc_add_test(test-qofquerycore "${test_qofquerycore_SOURCES}"
|
||||
gtest_engine_INCLUDES gtest_old_engine_LIBS)
|
||||
|
||||
############################
|
||||
# This is a C test that needs GUILE environment variables set.
|
||||
# It does not pass on Win32.
|
||||
gnc_add_test_with_guile(test-scm-query test-scm-query.cpp ENGINE_TEST_INCLUDE_DIRS ENGINE_TEST_LIBS)
|
||||
############################
|
||||
|
||||
|
||||
set(engine_test_SCHEME
|
||||
test-create-account.scm
|
||||
)
|
||||
|
||||
#list(APPEND engine_test_SCHEME test-scm-query-import.scm) Fails
|
||||
|
||||
set(GUILE_DEPENDS scm-gnc-module scm-app-utils scm-engine)
|
||||
|
||||
gnc_add_scheme_test_targets(scm-test-engine-extras
|
||||
"test-engine-extras.scm"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS}"
|
||||
FALSE
|
||||
)
|
||||
|
||||
if (HAVE_SRFI64)
|
||||
gnc_add_scheme_test_targets (scm-srfi64-extras
|
||||
"srfi64-extras.scm"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS};scm-test-engine-extras;scm-srfi64-extras"
|
||||
FALSE
|
||||
)
|
||||
|
||||
gnc_add_scheme_deprecated_module ("gnucash engine test srfi64-extras" "tests srfi64-extras" "scm-srfi64-extras" "")
|
||||
|
||||
set (scm_tests_with_srfi64_SOURCES
|
||||
test-business-core.scm
|
||||
)
|
||||
|
||||
gnc_add_scheme_test_targets (scm-test-with-srfi64
|
||||
"${scm_tests_with_srfi64_SOURCES}"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS};scm-test-engine-extras;scm-srfi64-extras;gncmod-engine"
|
||||
FALSE
|
||||
)
|
||||
|
||||
gnc_add_scheme_tests("${scm_tests_with_srfi64_SOURCES}")
|
||||
add_dependencies(check scm-srfi64-extras)
|
||||
endif (HAVE_SRFI64)
|
||||
|
||||
gnc_add_scheme_test_targets(scm-test-engine
|
||||
"${engine_test_SCHEME}"
|
||||
"tests"
|
||||
"${GUILE_DEPENDS};scm-test-engine-extras"
|
||||
FALSE
|
||||
)
|
||||
|
||||
add_dependencies(check scm-test-engine)
|
||||
gnc_add_scheme_tests("${engine_test_SCHEME}")
|
||||
|
||||
# Module interfaces deprecated in 4.x, will be removed for 5.x
|
||||
gnc_add_scheme_deprecated_module ("gnucash engine test test-extras" "tests test-engine-extras" "scm-test-engine-extras" "")
|
||||
|
||||
|
||||
set(test_engine_SOURCES_DIST
|
||||
dummy.cpp
|
||||
@ -302,7 +241,6 @@ set(test_engine_SOURCES_DIST
|
||||
test-query.cpp
|
||||
test-querynew.c
|
||||
test-recurrence.c
|
||||
test-scm-query.cpp
|
||||
test-split-vs-account.cpp
|
||||
test-transaction-reversal.cpp
|
||||
test-transaction-voiding.cpp
|
||||
@ -316,17 +254,9 @@ set(test_engine_SOURCES_DIST
|
||||
utest-gnc-pricedb.c
|
||||
)
|
||||
|
||||
set(test_engine_SCHEME_DIST
|
||||
srfi64-extras.scm
|
||||
test-create-account.scm
|
||||
test-engine-extras.scm
|
||||
test-scm-query-import.scm
|
||||
test-business-core.scm
|
||||
)
|
||||
|
||||
set(test_engine_EXTRA_DIST
|
||||
README
|
||||
)
|
||||
|
||||
set_dist_list(test_engine_DIST CMakeLists.txt
|
||||
${test_engine_SOURCES_DIST} ${test_engine_SCHEME_DIST} ${test_engine_EXTRA_DIST})
|
||||
${test_engine_SOURCES_DIST} ${test_engine_EXTRA_DIST})
|
||||
|
Loading…
Reference in New Issue
Block a user