30 lines
766 B
Lua
30 lines
766 B
Lua
-- Configuration file for LuaCov
|
|
|
|
-- This variable is set externally
|
|
local source = os.getenv("SOURCE_DIRECTORY") or os.getenv('PWD')
|
|
local build = os.getenv("BUILD_DIRECTORY") or (source .. "/build")
|
|
|
|
local function escape_pattern(str)
|
|
return string.gsub(str, "%W", "%%%1")
|
|
end
|
|
|
|
return {
|
|
statsfile = build .. "/luacov.stats.out",
|
|
reportfile = build .. "/luacov.report.out",
|
|
|
|
include = {
|
|
escape_pattern(source) .. "/.+",
|
|
-- Relative paths (to source/build dir).
|
|
'^[^/].+',
|
|
},
|
|
|
|
-- configuration for luacov-coveralls reporter
|
|
coveralls = {
|
|
pathcorrect = {
|
|
{ escape_pattern(source .. '/'), ''},
|
|
},
|
|
},
|
|
}
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|