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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
t/test-results/
|
t/test-results/
|
||||||
|
t/tapout
|
||||||
|
@@ -5,7 +5,7 @@ compiler:
|
|||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
|
||||||
script: cd t && make
|
script: cd t && make SHELL=/bin/bash
|
||||||
|
|
||||||
## whitelist
|
## whitelist
|
||||||
branches:
|
branches:
|
||||||
|
20
t/Makefile
20
t/Makefile
@@ -1,6 +1,7 @@
|
|||||||
SHELL_PATH ?= /bin/bash
|
SHELL_PATH ?= $(SHELL)
|
||||||
PROVE ?= prove
|
PROVE ?= prove
|
||||||
DEFAULT_TEST_TARGET ?= test
|
DEFAULT_TEST_TARGET ?= test
|
||||||
|
TAP_OUT ?= tapout
|
||||||
|
|
||||||
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
|
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)
|
@echo '*** prove ***'; prove --exec '$(SHELL_PATH_SQ)' $(PROVE_OPTS) $(T) :: $(TEST_OPTS)
|
||||||
@$(MAKE) clean-except-prove-cache
|
@$(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:
|
aggregate-results:
|
||||||
@for f in test-results/t*-*.counts; do \
|
@for f in test-results/t*-*.counts; do \
|
||||||
echo "$$f"; \
|
echo "$$f"; \
|
||||||
@@ -34,7 +42,11 @@ aggregate-results-and-cleanup: $(T)
|
|||||||
@$(MAKE) clean
|
@$(MAKE) clean
|
||||||
|
|
||||||
$(T):
|
$(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: all test prove tap aggregate-results $(T)
|
||||||
.PHONY: pre-clean clean-except-prove-cache clean aggregate-results-and-cleanup
|
.PHONY: pre-clean clean-except-prove-cache clean clean-tap aggregate-results-and-cleanup
|
||||||
|
@@ -24,6 +24,10 @@ or
|
|||||||
|
|
||||||
make DEFAULT_TEST_TARGET=prove
|
make DEFAULT_TEST_TARGET=prove
|
||||||
|
|
||||||
|
for tap output
|
||||||
|
|
||||||
|
make DEFAULT_TEST_TARGET=tap SHELL=/bin/bash
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
Makefile was shamelessly stolen from [git-integration](https://github.com/johnkeeping/git-integration/blob/master/t/Makefile)
|
Makefile was shamelessly stolen from [git-integration](https://github.com/johnkeeping/git-integration/blob/master/t/Makefile)
|
||||||
|
Reference in New Issue
Block a user