Add target to run bats tests to Makefile
The `bats` target will clone and install the bats command in a manner similar to `kerl` or `hex.pm`, i.e. to ERLANG_MK_TMP [#150452491] Signed-off-by: Luke Bakken <lbakken@pivotal.io>
This commit is contained in:
parent
42b8137f31
commit
c89e694abd
18
Makefile
18
Makefile
|
@ -149,6 +149,24 @@ ERLANG_MK_COMMIT = rabbitmq-tmp
|
||||||
include rabbitmq-components.mk
|
include rabbitmq-components.mk
|
||||||
include erlang.mk
|
include erlang.mk
|
||||||
|
|
||||||
|
ifeq ($(strip $(BATS)),)
|
||||||
|
BATS := $(ERLANG_MK_TMP)/bats/bin/bats
|
||||||
|
endif
|
||||||
|
|
||||||
|
BATS_GIT ?= https://github.com/sstephenson/bats
|
||||||
|
BATS_COMMIT ?= v0.4.0
|
||||||
|
|
||||||
|
$(BATS):
|
||||||
|
$(verbose) mkdir -p $(ERLANG_MK_TMP)
|
||||||
|
$(gen_verbose) git clone --depth 1 --branch=$(BATS_COMMIT) $(BATS_GIT) $(ERLANG_MK_TMP)/bats
|
||||||
|
|
||||||
|
.PHONY: bats
|
||||||
|
|
||||||
|
bats: $(BATS)
|
||||||
|
$(verbose) $(BATS) $(TEST_DIR)
|
||||||
|
|
||||||
|
tests:: bats
|
||||||
|
|
||||||
SLOW_CT_SUITES := backing_queue \
|
SLOW_CT_SUITES := backing_queue \
|
||||||
cluster_rename \
|
cluster_rename \
|
||||||
clustering_management \
|
clustering_management \
|
||||||
|
|
Loading…
Reference in New Issue