|
|
add_definitions(-DCORE_TESTS_RESOURCES_DIR="${CMAKE_CURRENT_LIST_DIR}/../tests-resources")
|
|
|
|
|
|
FILE (GLOB_RECURSE TestUtilsSources
|
|
|
TestUtils/TestProviders.h
|
|
|
TestUtils/TestProviders.cpp
|
|
|
)
|
|
|
|
|
|
add_library(TestUtils ${TestUtilsSources})
|
|
|
target_link_libraries(TestUtils sciqlopcore Qt5::Test)
|
|
|
target_include_directories(TestUtils PUBLIC
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/TestUtils
|
|
|
)
|
|
|
|
|
|
declare_test(TestStringUtils TestStringUtils Common/TestStringUtils.cpp "sciqlopcore;Qt5::Test")
|
|
|
|
|
|
declare_test(TestContainers TestContainers Common/TestContainers.cpp "sciqlopcore;Qt5::Test")
|
|
|
declare_test(TestSyncGroup TestSyncGroup Variable/TestSyncGroup.cpp "sciqlopcore;Qt5::Test")
|
|
|
|
|
|
declare_test(TestDateTimeRange TestDateTimeRange Data/TestDateTimeRange.cpp "sciqlopcore;Qt5::Test")
|
|
|
|
|
|
declare_test(TestDataSourceController TestDataSourceController
|
|
|
"DataSource/TestDataSourceController.cpp;DataSource/DataSourceItemBuilder.cpp"
|
|
|
"sciqlopcore;Qt5::Test")
|
|
|
declare_test(TestDataSourceItem TestDataSourceItem
|
|
|
"DataSource/TestDataSourceItem.cpp;DataSource/DataSourceItemBuilder.cpp"
|
|
|
"sciqlopcore;Qt5::Test")
|
|
|
|
|
|
declare_test(TestVariable TestVariable Variable/TestVariable.cpp "sciqlopcore;Qt5::Test")
|
|
|
declare_test(TestDownloader TestDownloader Network/TestDownloader.cpp "sciqlopcore;Qt5::Test;Qt5::Concurrent")
|
|
|
|
|
|
|
|
|
declare_test(TestVariableController2 TestVariableController2 Variable/TestVariableController2.cpp "sciqlopcore;TestUtils;Qt5::Test")
|
|
|
declare_test(TestVariableController2Async TestVariableController2Async Variable/TestVariableController2Async.cpp "sciqlopcore;TestUtils;Qt5::Test")
|
|
|
declare_test(TestVariableController2WithSync TestVariableController2WithSync Variable/TestVariableController2WithSync.cpp "sciqlopcore;TestUtils;Qt5::Test")
|
|
|
|
|
|
declare_test(TestCatalogueController TestCatalogueController CatalogueController/TestCatalogueController.cpp "sciqlopcore;TestUtils;Qt5::Test")
|
|
|
|
|
|
add_executable(TestVariablesEmbed TestUtils/PyTestWrapperExe.cpp)
|
|
|
target_link_libraries(TestVariablesEmbed PRIVATE pybind11::embed)
|
|
|
add_test(NAME TestTestVariablesEmbed COMMAND TestVariablesEmbed)
|
|
|
target_compile_definitions(TestVariablesEmbed PRIVATE -DPYTEST_SCRIPT="${CMAKE_CURRENT_LIST_DIR}/TestVariables.py")
|
|
|
set_tests_properties(TestTestVariablesEmbed PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/../)
|
|
|
|
|
|
find_package(PythonInterp 3 REQUIRED)
|
|
|
|
|
|
add_test(NAME TestVariables
|
|
|
COMMAND ${PYTHON_EXECUTABLE}
|
|
|
${CMAKE_CURRENT_LIST_DIR}/TestVariables.py
|
|
|
TestVariables)
|
|
|
set_tests_properties(TestVariables PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/../)
|
|
|
|