Add integration tests to 'make check'

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-07-25 17:24:14 +02:00 committed by Daniel Hahler
parent 8a628bed7e
commit c1ea77dab1
1 changed files with 11 additions and 2 deletions

View File

@ -320,14 +320,23 @@ if(GENERATE_DOC)
endif()
# }}}
# {{{ Unit tests
# {{{ Tests
find_program(BUSTED_EXECUTABLE busted)
if(BUSTED_EXECUTABLE)
add_custom_target(check ALL
add_custom_target(check-unit ALL
${BUSTED_EXECUTABLE} "--lpath=${CMAKE_BINARY_DIR}/lib/?.lua;${CMAKE_BINARY_DIR}/lib/?/init.lua;spec/?.lua"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
VERBATIM)
endif()
add_custom_target(check-integration
"${CMAKE_SOURCE_DIR}/tests/run.sh"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
VERBATIM)
if(BUSTED_EXECUTABLE)
add_custom_target(check DEPENDS check-integration check-unit)
else()
add_custom_target(check DEPENDS check-integration)
endif()
# }}}
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker