diff --git a/.travis.yml b/.travis.yml index 88b9cd6df..6566f1fa2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -184,7 +184,7 @@ script: && make) do_codecov samples - make check-unit-coverage || exit 1 + make check-unit || exit 1 do_codecov unittests make check-integration || exit 1 make check-themes || exit 1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 27d3efc95..2f8bda02a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -424,20 +424,17 @@ add_custom_target(check-requires list(APPEND CHECK_QA_TARGETS check-requires) a_find_program(BUSTED_EXECUTABLE busted FALSE) if(BUSTED_EXECUTABLE) - # Keep the arguments in sync with the version below! + if(DO_COVERAGE) + set(BUSTED_ARGS "--coverage") + else() + set(BUSTED_ARGS) + endif() add_custom_target(check-unit - ${BUSTED_EXECUTABLE} + COMMAND ${BUSTED_EXECUTABLE} ${BUSTED_ARGS} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Running unit tests" VERBATIM) list(APPEND CHECK_TARGETS check-unit) - - # Same as above, but with --coverage argument - add_custom_target(check-unit-coverage - ${BUSTED_EXECUTABLE} "--coverage" - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMENT "Running unit tests under LuaCov" - VERBATIM) else() add_custom_target(check-unit true COMMENT "Skipping check-unit, since busted was not found"