Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroflag committed Feb 18, 2025
1 parent 11fa4f3 commit d5a43f2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
24 changes: 17 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,26 @@ test:
if ! command -v $$luaver > /dev/null 2>&1; then \
echo "$$luaver is not installed skippping"; \
else \
$(MAKE) -s lua_tests luaver=$$luaver || exit 1; \
$(MAKE) -s eqx_tests luaver=$$luaver opt=-o0 || exit 1; \
$(MAKE) -s eqx_tests luaver=$$luaver opt=-o1 || exit 1; \
$(MAKE) -s out_tests luaver=$$luaver opt=-o0 || exit 1; \
$(MAKE) -s out_tests luaver=$$luaver opt=-o1 || exit 1; \
$(MAKE) -s opt_tests luaver=$$luaver || exit 1; \
if [ $$coverage = "true" ] && $$luaver -e 'require("luacov")' 2>/dev/null; then \
echo "luacov is installed"; \
luacmd="$$luaver -lluacov"; \
else \
echo "luacov is NOT installed"; \
luacmd="$$luaver"; \
fi ; \
$(MAKE) -s lua_tests luaver="$$luacmd" || exit 1; \
$(MAKE) -s eqx_tests luaver="$$luacmd" opt=-o0 || exit 1; \
$(MAKE) -s eqx_tests luaver="$$luacmd" opt=-o1 || exit 1; \
$(MAKE) -s out_tests luaver="$$luacmd" opt=-o0 || exit 1; \
$(MAKE) -s out_tests luaver="$$luacmd" opt=-o1 || exit 1; \
$(MAKE) -s opt_tests luaver="$$luacmd" || exit 1; \
fi; \
done ;
@echo "$(GREEN)All tests passed!$(NC)"

coverage:
$(MAKE) -s test coverage="true" || exit 1; \

version:
@echo "Increase patch version" ; \
lua $(SRC_DIR)/version/version.lua ; \
Expand Down Expand Up @@ -97,4 +107,4 @@ clean:
rm -f $(BUNDLE) ; \

# Add a phony directive to prevent file conflicts
.PHONY: all test clean bundle rockspec repl version lua_tests eqx_tests opt_tests out_tests install
.PHONY: all test clean bundle rockspec repl version lua_tests eqx_tests opt_tests out_tests install coverage
2 changes: 1 addition & 1 deletion src/equinox_bundle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3257,7 +3257,7 @@ return utils
end
end

__VERSION__="0.1-305"
__VERSION__="0.1-311"

local Compiler = require("compiler")
local Optimizer = require("ast_optimizer")
Expand Down
2 changes: 1 addition & 1 deletion src/version/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1-305
0.1-311
2 changes: 0 additions & 2 deletions tests/test_for_iter.eqx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ alias: gmatch #( string.gmatch 2 )
each >num +
end

dup . cr

15 =assert

depth 0 =assert
Expand Down

0 comments on commit d5a43f2

Please sign in to comment.