mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-27 01:13:00 +00:00
Bugfix: windows + luacov = crash, so disable it on windows for now
This commit is contained in:
parent
1aa3071154
commit
71de7ff04f
1 changed files with 21 additions and 13 deletions
8
tests.sh
8
tests.sh
|
@ -66,9 +66,11 @@ run_setup() {
|
||||||
log_msg "Installing busted";
|
log_msg "Installing busted";
|
||||||
|
|
||||||
luarocks --tree "${luarocks_root}" install busted;
|
luarocks --tree "${luarocks_root}" install busted;
|
||||||
|
if [[ "${OSTYPE}" != *"msys"* ]]; then
|
||||||
luarocks --tree "${luarocks_root}" install luacov;
|
luarocks --tree "${luarocks_root}" install luacov;
|
||||||
luarocks --tree "${luarocks_root}" install cluacov;
|
luarocks --tree "${luarocks_root}" install cluacov;
|
||||||
luarocks --tree "${luarocks_root}" install luacov-html;
|
luarocks --tree "${luarocks_root}" install luacov-html;
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
run_syntax_check() {
|
run_syntax_check() {
|
||||||
|
@ -88,8 +90,13 @@ run_test() {
|
||||||
echo "Error: Failed to find busted at .luarocks/bin/busted or .luarocks/bin/busted.bat" >&2;
|
echo "Error: Failed to find busted at .luarocks/bin/busted or .luarocks/bin/busted.bat" >&2;
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${OSTYPE}" == *"msys"* ]]; then
|
||||||
|
"${busted_path}" --no-auto-insulate --pattern ".test.lua" .tests;
|
||||||
|
else
|
||||||
"${busted_path}" --coverage --no-auto-insulate --pattern ".test.lua" .tests;
|
"${busted_path}" --coverage --no-auto-insulate --pattern ".test.lua" .tests;
|
||||||
|
|
||||||
|
|
||||||
# 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
|
||||||
mv "luacov-html" ".luacov-html";
|
mv "luacov-html" ".luacov-html";
|
||||||
|
@ -100,6 +107,7 @@ run_test() {
|
||||||
else rm "luacov.report.out"; fi
|
else 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
|
||||||
}
|
}
|
||||||
|
|
||||||
case "${mode}" in
|
case "${mode}" in
|
||||||
|
|
Loading…
Reference in a new issue