diff --git a/.busted b/.busted new file mode 100644 index 000000000..4060aba3b --- /dev/null +++ b/.busted @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ea83815b..91df3dd69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)