From 2c1199eb5b05cc55f4e859be1f903a536468b1fe Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 9 Apr 2015 21:13:30 +0200 Subject: Automatic tests. --- CMakeLists.txt | 2 ++ tests/CMakeLists.txt | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97c4466..361c5a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,8 @@ include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/common) configure_file(hawd.conf hawd.conf) +enable_testing() + set(AKONADI2_RESOURCE_PLUGINS_PATH ${QT_PLUGIN_INSTALL_DIR}/akonadi2/resources) # common, eventually a lib but right now just the command buffers diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a38471f..d3e6870 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,14 +14,26 @@ macro(manual_tests) endforeach(_testname) endmacro(manual_tests) +macro(auto_tests) + foreach(_testname ${ARGN}) + add_executable(${_testname} ${_testname}.cpp) + add_test(${_testname} ${_testname}) + qt5_use_modules(${_testname} Core Test Concurrent) + target_link_libraries(${_testname} akonadi2common libhawd) + endforeach(_testname) +endmacro(auto_tests) + manual_tests ( storagebenchmark + dummyresourcebenchmark +) + +auto_tests ( storagetest dummyresourcetest domainadaptortest messagequeuetest indextest - dummyresourcebenchmark ) target_link_libraries(dummyresourcetest akonadi2_resource_dummy) -- cgit v1.2.3