Commit 4822c17d authored by François Perrad's avatar François Perrad
Browse files

refactor testing & coverage

parent 8b2319c9
Pipeline #145654 passed with stages
in 28 seconds
......@@ -16,8 +16,6 @@ INSTALL := install
BED_OPTS:= --lua latest
export LUA_PATH := ;;$(CURDIR)/src/?.lua
all:
@echo "Nothing to build here, you can just make install"
......@@ -101,8 +99,6 @@ deb:
echo " -- $(shell git config --get user.name) <$(shell git config --get user.email)> $(shell date -R)" >> debian/changelog
fakeroot debian/rules clean binary
check: test
bed:
hererocks bed $(BED_OPTS) --no-readline --luarocks latest --verbose
bed/bin/luarocks install lua-testmore
......@@ -111,16 +107,20 @@ bed:
hererocks bed --show
bed/bin/luarocks list
check: test
test:
prove --exec=$(LUA) test/*.lua
LUA_PATH=";;$(CURDIR)/src/?.lua" \
prove --exec=$(LUA) test/*.lua
luacheck:
luacheck --std=max --codes src --ignore 211/_ENV
luacheck --std=min --config .test.luacheckrc test/*.lua
luacheck --std=min --config .test.luacheckrc test
coverage:
rm -f luacov.*
-prove --exec="$(LUA) -lluacov" test/*.lua
-LUA_PATH=";;$(CURDIR)/src/?.lua" \
prove --exec="$(LUA) -lluacov" test/*.lua
luacov-console $(CURDIR)/src
luacov-console -s $(CURDIR)/src
luacov-console test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment