mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
make: fix emulator coverage rule
- use same busted launch script as for tests - build & install necessary test data so it can be run from scratch
This commit is contained in:
committed by
Frans de Jonge
parent
050c7a96ac
commit
b5c4ccc5b3
@@ -29,7 +29,7 @@ run-wbuilder: all
|
||||
|
||||
# Testing & coverage. {{{
|
||||
|
||||
PHONY += coverage test testbase testfront
|
||||
PHONY += coverage coverage-full coverage-run coverage-summary test testbase testfront
|
||||
|
||||
$(INSTALL_DIR)/koreader/.busted: .busted
|
||||
$(SYMLINK) .busted $@
|
||||
@@ -46,12 +46,16 @@ testfront: all test-data $(INSTALL_DIR)/koreader/.busted
|
||||
|
||||
test: testbase testfront
|
||||
|
||||
coverage: $(INSTALL_DIR)/koreader/.luacov
|
||||
coverage: coverage-summary
|
||||
|
||||
coverage-run: all test-data $(INSTALL_DIR)/koreader/.busted $(INSTALL_DIR)/koreader/.luacov
|
||||
-rm -rf $(INSTALL_DIR)/koreader/luacov.*.out
|
||||
cd $(INSTALL_DIR)/koreader && \
|
||||
./luajit $(shell which busted) --output=gtest \
|
||||
--sort-files \
|
||||
--coverage --exclude-tags=nocov
|
||||
cd $(INSTALL_DIR)/koreader && $(BUSTED_LUAJIT) --coverage --exclude-tags=nocov
|
||||
|
||||
coverage-full: coverage-run
|
||||
cd $(INSTALL_DIR)/koreader && cat luacov.report.out
|
||||
|
||||
coverage-summary: coverage-run
|
||||
# coverage report summary
|
||||
cd $(INSTALL_DIR)/koreader && tail -n \
|
||||
+$$(($$(grep -nm1 -e "^Summary$$" luacov.report.out|cut -d: -f1)-1)) \
|
||||
|
||||
Reference in New Issue
Block a user