2016-02-06 15:23:28 +01:00
|
|
|
-- Configuration file for LuaCov
|
|
|
|
|
|
|
|
-- This variable is set externally
|
2017-01-03 14:29:10 +01:00
|
|
|
local source = os.getenv("SOURCE_DIRECTORY") or os.getenv('PWD')
|
|
|
|
local build = os.getenv("BUILD_DIRECTORY") or (source .. "/build")
|
|
|
|
local lib_dir = os.getenv("AWESOME_LIB_DIR") or (source .. "/lib")
|
2016-02-06 15:23:28 +01:00
|
|
|
|
|
|
|
local function escape_pattern(str)
|
|
|
|
return string.gsub(str, "%W", "%%%1")
|
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
2017-01-03 14:29:10 +01:00
|
|
|
statsfile = build .. "/luacov.stats.out",
|
2016-02-06 15:23:28 +01:00
|
|
|
|
|
|
|
include = {
|
2017-01-03 14:29:10 +01:00
|
|
|
escape_pattern(lib_dir) .. "/.+",
|
2016-02-06 17:18:23 +01:00
|
|
|
|
|
|
|
-- For things already having the correct path
|
|
|
|
-- (happens with integration tests)
|
|
|
|
"^lib/",
|
2016-02-06 15:23:28 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
-- configuration for luacov-coveralls reporter
|
|
|
|
coveralls = {
|
|
|
|
pathcorrect = {
|
2017-01-03 14:29:10 +01:00
|
|
|
{ escape_pattern(lib_dir..'/'), "lib/"},
|
2016-02-06 15:23:28 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|