1
0
mirror of https://github.com/albfan/bash-ini-parser.git synced 2025-08-07 18:02:52 +03:00

add tap test output

This commit is contained in:
albfan
2015-06-28 09:38:20 +02:00
parent a5e1dd880d
commit 7ccb706eb1
4 changed files with 22 additions and 5 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
t/test-results/
t/tapout

View File

@@ -5,7 +5,7 @@ compiler:
before_install:
script: cd t && make
script: cd t && make SHELL=/bin/bash
## whitelist
branches:

View File

@@ -1,6 +1,7 @@
SHELL_PATH ?= /bin/bash
SHELL_PATH ?= $(SHELL)
PROVE ?= prove
DEFAULT_TEST_TARGET ?= test
TAP_OUT ?= tapout
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
@@ -15,6 +16,13 @@ prove: pre-clean
@echo '*** prove ***'; prove --exec '$(SHELL_PATH_SQ)' $(PROVE_OPTS) $(T) :: $(TEST_OPTS)
@$(MAKE) clean-except-prove-cache
tap: pre-clean clean-tap
mkdir $(TAP_OUT)
@$(MAKE) aggregate-results-and-cleanup
clean-tap:
@$(RM) -r $(TAP_OUT)
aggregate-results:
@for f in test-results/t*-*.counts; do \
echo "$$f"; \
@@ -34,7 +42,11 @@ aggregate-results-and-cleanup: $(T)
@$(MAKE) clean
$(T):
ifeq ($(DEFAULT_TEST_TARGET),tap)
@echo '*** $@ ***'; '$(SHELL_PATH_SQ)' $@ > $(TAP_OUT)/$@
else
@echo '*** $@ ***'; '$(SHELL_PATH_SQ)' $@
endif
.PHONY: all test prove aggregate-results $(T)
.PHONY: pre-clean clean-except-prove-cache clean aggregate-results-and-cleanup
.PHONY: all test prove tap aggregate-results $(T)
.PHONY: pre-clean clean-except-prove-cache clean clean-tap aggregate-results-and-cleanup

View File

@@ -24,6 +24,10 @@ or
make DEFAULT_TEST_TARGET=prove
for tap output
make DEFAULT_TEST_TARGET=tap SHELL=/bin/bash
## Credits
Makefile was shamelessly stolen from [git-integration](https://github.com/johnkeeping/git-integration/blob/master/t/Makefile)