You've already forked bash-ini-parser
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:
20
t/Makefile
20
t/Makefile
@@ -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):
|
||||
@echo '*** $@ ***'; '$(SHELL_PATH_SQ)' $@
|
||||
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
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user