From 7f9b51c7e06a57246a8b0c4f9d3ba6be692440e4 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Tue, 15 Aug 2023 03:01:22 +0100 Subject: [PATCH] tests.sh: fix coverage html generation --- tests.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests.sh b/tests.sh index 5e4473b..174cea1 100755 --- a/tests.sh +++ b/tests.sh @@ -101,12 +101,13 @@ run_test() { else 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; "${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 # If it doesn't begin with a dot, then Minetest *will* complain if [[ -d "luacov-html" ]]; then @@ -117,7 +118,7 @@ run_test() { if [[ -s "luacov.report.out" ]]; then : 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 }