Add integration tests to 'make check'
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
8a628bed7e
commit
c1ea77dab1
|
@ -320,14 +320,23 @@ if(GENERATE_DOC)
|
||||||
endif()
|
endif()
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# {{{ Unit tests
|
# {{{ Tests
|
||||||
find_program(BUSTED_EXECUTABLE busted)
|
find_program(BUSTED_EXECUTABLE busted)
|
||||||
if(BUSTED_EXECUTABLE)
|
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"
|
${BUSTED_EXECUTABLE} "--lpath=${CMAKE_BINARY_DIR}/lib/?.lua;${CMAKE_BINARY_DIR}/lib/?/init.lua;spec/?.lua"
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
endif()
|
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
|
# vim: filetype=cmake:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80:foldmethod=marker
|
||||||
|
|
Loading…
Reference in New Issue