mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-05 06:53:52 +01:00
tests.sh: fix coverage html generation
This commit is contained in:
parent
7e6e61a00b
commit
7f9b51c7e0
7
tests.sh
7
tests.sh
@ -101,12 +101,13 @@ run_test() {
|
|||||||
else
|
else
|
||||||
if [[ -r "luacov.stats.out" ]]; then rm "luacov.stats.out"; fi
|
if [[ -r "luacov.stats.out" ]]; then rm "luacov.stats.out"; fi
|
||||||
|
|
||||||
|
# Delete any pre-existing coverage info from any prev runs
|
||||||
|
if [[ -d "luacov-html" ]]; then rm -r "luacov-html"; fi
|
||||||
|
|
||||||
set +e;
|
set +e;
|
||||||
"${busted_path}" --coverage --no-auto-insulate --pattern ".test.lua" .tests;
|
"${busted_path}" --coverage --no-auto-insulate --pattern ".test.lua" .tests;
|
||||||
set -e;
|
set -e;
|
||||||
|
|
||||||
# Delete any pre-existing coverage info from any prev runs
|
|
||||||
if [[ -d "luacov-html" ]]; then rm -r "luacov-html"; fi
|
|
||||||
|
|
||||||
# If it doesn't begin with a dot, then Minetest *will* complain
|
# If it doesn't begin with a dot, then Minetest *will* complain
|
||||||
if [[ -d "luacov-html" ]]; then
|
if [[ -d "luacov-html" ]]; then
|
||||||
@ -117,7 +118,7 @@ run_test() {
|
|||||||
if [[ -s "luacov.report.out" ]]; then :
|
if [[ -s "luacov.report.out" ]]; then :
|
||||||
elif [[ -e "luacov.report.out" ]]; then 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")";
|
echo -e "Output written to $(display_url "file://$PWD/.luacov-html/index.html" "./.luacov-html/index.html")";
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user