From ddebcb953662c817461852689dd6f694418a55c5 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 7 Oct 2017 14:06:00 +0200 Subject: Add C++ offline tests and set them default Signed-off-by: Szczepan Zalega --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d28425a..1248e23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,11 +150,14 @@ IF (COMPILE_TESTS) add_executable (test_issues unittest/test_issues.cc) target_link_libraries (test_issues ${EXTRA_LIBS} ${LIBNAME}-log catch) + add_executable (test_offline unittest/test_offline.cc) + target_link_libraries (test_offline ${EXTRA_LIBS} ${LIBNAME}-log catch) + #run with 'make test' or 'ctest' #needs connected PRO device for success #warning: it may delete data on the device include (CTest) - add_test (runs test_C_API) + add_test (runs test_offline) ENDIF() -- cgit v1.2.1 From badeb19f9d43fafe7a94e9028ad9e65ef4bc1770 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 7 Oct 2017 14:19:00 +0200 Subject: Enable offline test on all instances Signed-off-by: Szczepan Zalega --- CMakeLists.txt | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1248e23..c868fae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,11 +127,18 @@ install (FILES ${LIB_INCLUDES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libnitrok install (TARGETS ${LIBNAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) install (TARGETS ${LIBNAME}-log DESTINATION ${CMAKE_INSTALL_LIBDIR}) -IF (COMPILE_TESTS) - include_directories(unittest/Catch/include) - add_library(catch STATIC unittest/catch_main.cpp ) +include_directories(unittest/Catch/include) +add_library(catch STATIC unittest/catch_main.cpp ) +add_executable (test_offline unittest/test_offline.cc) +target_link_libraries (test_offline ${EXTRA_LIBS} ${LIBNAME}-log catch) +#run with 'make test' or 'ctest' +include (CTest) +add_test (runs test_offline) +IF (COMPILE_TESTS) + #needs connected PRO device for success + #warning: it may delete data on the device add_executable (test_C_API unittest/test_C_API.cpp) target_link_libraries (test_C_API ${EXTRA_LIBS} ${LIBNAME}-log catch) @@ -150,14 +157,6 @@ IF (COMPILE_TESTS) add_executable (test_issues unittest/test_issues.cc) target_link_libraries (test_issues ${EXTRA_LIBS} ${LIBNAME}-log catch) - add_executable (test_offline unittest/test_offline.cc) - target_link_libraries (test_offline ${EXTRA_LIBS} ${LIBNAME}-log catch) - - #run with 'make test' or 'ctest' - #needs connected PRO device for success - #warning: it may delete data on the device - include (CTest) - add_test (runs test_offline) ENDIF() -- cgit v1.2.1