mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
02cdb5103b
This is ugly, but at least it works. Hopefully... Signed-off-by: Uli Schlachter <uli.schlachter@informatik.uni-oldenburg.de>
35 lines
994 B
Lua
35 lines
994 B
Lua
-- Configuration file for LuaCov
|
|
|
|
-- This variable is set externally
|
|
local build = os.getenv("BUILD_DIRECTORY") or error("$BUILD_DIRECTORY not set")
|
|
local lib_dir = os.getenv("AWESOME_LIB_DIR") or build .. "lib/"
|
|
local source = os.getenv("SOURCE_DIRECTORY")
|
|
|
|
local function escape_pattern(str)
|
|
return string.gsub(str, "%W", "%%%1")
|
|
end
|
|
|
|
return {
|
|
statsfile = build .. "luacov.stats.out",
|
|
|
|
include = {
|
|
escape_pattern(lib_dir) .. ".+",
|
|
|
|
-- For things already having the correct path
|
|
-- (happens with integration tests)
|
|
"^lib/",
|
|
|
|
-- For the shape-API auto-generated images
|
|
source and escape_pattern(source .. "lib/"),
|
|
},
|
|
|
|
-- configuration for luacov-coveralls reporter
|
|
coveralls = {
|
|
pathcorrect = {
|
|
{ escape_pattern(lib_dir), "lib/"},
|
|
source and { escape_pattern(source .. "lib/"), "lib/" },
|
|
},
|
|
},
|
|
}
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|