diff --git a/CMakeLists.txt b/CMakeLists.txt index 991c6a92..07dc15bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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