move tests to separate dir

create macro "pip_test()" for easily add new tests
This commit is contained in:
2020-07-31 15:47:08 +03:00
parent e728b30e5e
commit 21111b3e67
8 changed files with 675 additions and 666 deletions

15
tests/CMakeLists.txt Normal file
View File

@@ -0,0 +1,15 @@
include(DownloadGTest)
macro(pip_test NAME LIBS)
gather_src("${NAME}" CPP_${NAME}_TEST _T_H _T_PH)
set(_target pip_${NAME}_test)
add_executable(${_target} ${CPP_${NAME}_TEST})
target_link_libraries(${_target} pip ${LIBS} gtest_main gmock_main)
add_test(NAME ${_target} COMMAND tests)
add_custom_target(${_target}_perform ALL COMMAND ${_target})
list(APPEND PIP_TESTS_LIST "${NAME}")
set(PIP_TESTS_LIST ${PIP_TESTS_LIST} PARENT_SCOPE)
endmacro()
# Concurrent tests
pip_test(concurrent "")