tests: busted: add config file, use --verbose by default (#2076)

This commit is contained in:
Daniel Hahler 2017-10-22 18:05:00 +02:00 committed by GitHub
parent 288b7030f3
commit 1ab861ea3a
2 changed files with 11 additions and 5 deletions

9
.busted Normal file
View File

@ -0,0 +1,9 @@
return {
default = {
verbose = true,
helper = "spec/preload.lua",
lpath = "lib/?.lua;lib/?/init.lua;spec/?.lua",
},
}
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -412,8 +412,7 @@ a_find_program(BUSTED_EXECUTABLE busted FALSE)
if(BUSTED_EXECUTABLE)
# Keep the arguments in sync with the version below!
add_custom_target(check-unit
${BUSTED_EXECUTABLE} "--helper=${CMAKE_SOURCE_DIR}/spec/preload.lua"
"--lpath=lib/?.lua;lib/?/init.lua;spec/?.lua"
${BUSTED_EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Running unit tests"
VERBATIM)
@ -421,9 +420,7 @@ if(BUSTED_EXECUTABLE)
# Same as above, but with --coverage argument
add_custom_target(check-unit-coverage
${BUSTED_EXECUTABLE} "--helper=${CMAKE_SOURCE_DIR}/spec/preload.lua"
"--lpath=lib/?.lua;lib/?/init.lua;spec/?.lua"
"--coverage"
${BUSTED_EXECUTABLE} "--coverage"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Running unit tests under LuaCov"
VERBATIM)