-- 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 lib_dir = os.getenv("AWESOME_LIB_DIR") or (source .. "/lib") 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/", }, -- configuration for luacov-coveralls reporter coveralls = { pathcorrect = { { escape_pattern(lib_dir..'/'), "lib/"}, }, }, } -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80