mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
add test for creating query object and setting search_for
related to Bug 796137 and fix in commit 1a7c5b9a32
29 lines
1.1 KiB
CMake
29 lines
1.1 KiB
CMake
|
|
if (WITH_PYTHON)
|
|
find_path(test_core_dir "unittest_support.py" PATHS ${CMAKE_BINARY_DIR}/common/test-core ${CMAKE_SOURCE_DIR}/common/test-core)
|
|
if (${test_core_dir} STREQUAL "test_core_dir-NOTFOUND")
|
|
# Because it hasn't been built yet
|
|
set(test_core_dir ${CMAKE_BINARY_DIR}/common/test-core)
|
|
endif()
|
|
add_custom_target(test-python-bindings ALL DEPENDS unittest_support gnucash-core-c-build gnucash-core-c-py)
|
|
add_dependencies(check test-python-bindings)
|
|
add_test(python-bindings ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/runTests.py.in)
|
|
set_property(TEST python-bindings PROPERTY ENVIRONMENT
|
|
GNC_BUILDDIR=${CMAKE_BINARY_DIR}
|
|
PYTHONPATH=${PYTHON_SYSCONFIG_BUILD}:${LIBDIR_BUILD}/gnucash:${test_core_dir}
|
|
)
|
|
endif()
|
|
|
|
set(test_python_bindings_DATA
|
|
runTests.py.in
|
|
test_account.py
|
|
test_book.py
|
|
test_business.py
|
|
test_commodity.py
|
|
test_numeric.py
|
|
test_split.py
|
|
test_transaction.py
|
|
test_query.py)
|
|
|
|
set_dist_list(test_python_bindings_DIST CMakeLists.txt ${test_python_bindings_DATA})
|