mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-25 21:05:01 +00:00
tests.sh: fix coverage
This commit is contained in:
parent
eb14334441
commit
af4562d2e3
2 changed files with 6 additions and 1 deletions
1
.luacov
1
.luacov
|
@ -3,6 +3,7 @@ reporter = "html"
|
|||
return {
|
||||
modules = {
|
||||
["worldeditadditions_core.**"] = "worldeditadditions_core",
|
||||
["worldeditadditions_core.utils.parse.**"] = "worldeditadditions_core.parse"
|
||||
},
|
||||
include = {
|
||||
"worldeditadditions_core$",
|
||||
|
|
6
tests.sh
6
tests.sh
|
@ -94,7 +94,11 @@ run_test() {
|
|||
if [[ "${OSTYPE}" == *"msys"* ]]; then
|
||||
"${busted_path}" --no-auto-insulate --pattern ".test.lua" .tests;
|
||||
else
|
||||
if [[ -r "luacov.stats.out" ]]; then rm "luacov.stats.out"; fi
|
||||
|
||||
set +e;
|
||||
"${busted_path}" --coverage --no-auto-insulate --pattern ".test.lua" .tests;
|
||||
set -e;
|
||||
|
||||
# Delete any pre-existing coverage info from any prev runs
|
||||
if [[ -d "luacov-html" ]]; then rm -r "luacov-html"; fi
|
||||
|
@ -106,7 +110,7 @@ run_test() {
|
|||
|
||||
# Remove, but only if empty
|
||||
if [[ -s "luacov.report.out" ]]; then :
|
||||
else rm "luacov.report.out"; fi
|
||||
elif [[ -e "luacov.report.out" ]]; then rm "luacov.report.out"; fi
|
||||
|
||||
echo -e "Output written to $(display_url "file://$PWD/luacov-html/index.html" "./luacov-html/index.html")";
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue