mirror of
https://github.com/britzl/monarch.git
synced 2025-06-26 18:07:46 +02:00
Updated code coverage collection
This commit is contained in:
parent
75e3ac1ce9
commit
588398e23e
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ build
|
||||
.cproject
|
||||
builtins
|
||||
.internal
|
||||
luacov.report.out
|
||||
|
74
.luacov
Normal file
74
.luacov
Normal file
@ -0,0 +1,74 @@
|
||||
local reporter = require "luacov.reporter.defold"
|
||||
|
||||
--- Default values for configuration options.
|
||||
-- For project specific configuration create '.luacov' file in your project
|
||||
-- folder. It should be a Lua script setting various options as globals
|
||||
-- or returning table of options.
|
||||
-- @class module
|
||||
-- @name deftest.coverage.configuration
|
||||
return {
|
||||
|
||||
--- Reporter class to use when creating a report. Default: DefaultReporter from reporter.lua
|
||||
reporter = reporter,
|
||||
|
||||
--- Filename to store collected stats. Default: "luacov.stats.out".
|
||||
statsfile = "luacov.stats.out",
|
||||
|
||||
--- Filename to store report. Default: "luacov.report.out".
|
||||
reportfile = "luacov.report.out",
|
||||
|
||||
--- Enable saving coverage data after every `savestepsize` lines?
|
||||
-- Setting this flag to `true` in config is equivalent to running LuaCov
|
||||
-- using `luacov.tick` module. Default: false.
|
||||
tick = false,
|
||||
|
||||
--- Stats file updating frequency for `luacov.tick`.
|
||||
-- The lower this value - the more frequently results will be written out to the stats file.
|
||||
-- You may want to reduce this value (to, for example, 2) to avoid losing coverage data in
|
||||
-- case your program may terminate without triggering luacov exit hooks that are supposed
|
||||
-- to save the data. Default: 100.
|
||||
savestepsize = 100,
|
||||
|
||||
--- Run reporter on completion? Default: true.
|
||||
runreport = true,
|
||||
|
||||
--- Delete stats file after reporting? Default: false.
|
||||
deletestats = true,
|
||||
|
||||
--- Process Lua code loaded from raw strings?
|
||||
-- That is, when the 'source' field in the debug info
|
||||
-- does not start with '@'. Default: true.
|
||||
codefromstrings = true,
|
||||
|
||||
--- Lua patterns for files to include when reporting.
|
||||
-- All will be included if nothing is listed.
|
||||
-- Do not include the '.lua' extension. Path separator is always '/'.
|
||||
-- Overruled by `exclude`.
|
||||
-- @usage
|
||||
-- include = {
|
||||
-- "mymodule$", -- the main module
|
||||
-- "mymodule%/.+$", -- and everything namespaced underneath it
|
||||
-- }
|
||||
include = {},
|
||||
|
||||
--- Lua patterns for files to exclude when reporting.
|
||||
-- Nothing will be excluded if nothing is listed.
|
||||
-- Do not include the '.lua' extension. Path separator is always '/'.
|
||||
-- Overrules `include`.
|
||||
exclude = { "^test%/.+$", "^deftest%/.+$" },
|
||||
|
||||
--- Table mapping names of modules to be included to their filenames.
|
||||
-- Has no effect if empty.
|
||||
-- Real filenames mentioned here will be used for reporting
|
||||
-- even if the modules have been installed elsewhere.
|
||||
-- Module name can contain '*' wildcard to match groups of modules,
|
||||
-- in this case corresponding path will be used as a prefix directory
|
||||
-- where modules from the group are located.
|
||||
-- @usage
|
||||
-- modules = {
|
||||
-- ["some_rock"] = "src/some_rock.lua",
|
||||
-- ["some_rock.*"] = "src"
|
||||
-- }
|
||||
modules = {},
|
||||
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
[project]
|
||||
title = Monarch
|
||||
version = 0.9
|
||||
dependencies = https://github.com/britzl/deftest/archive/2.4.0.zip
|
||||
dependencies = https://github.com/britzl/deftest/archive/2.4.2.zip
|
||||
|
||||
[bootstrap]
|
||||
main_collection = /example/example.collectionc
|
||||
main_collection = /test/test.collectionc
|
||||
|
||||
[input]
|
||||
game_binding = /input/game.input_bindingc
|
||||
|
@ -5,5 +5,5 @@ local test_monarch = require "test.test_monarch"
|
||||
|
||||
function init(self)
|
||||
deftest.add(test_monarch)
|
||||
deftest.run({ coverage = true })
|
||||
deftest.run({ coverage = { enabled = true }})
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user