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:
Gerhard Lazu 2017-08-22 10:18:05 -07:00 committed by Gerhard Lazu
parent 42b8137f31
commit c89e694abd
1 changed files with 18 additions and 0 deletions

View File

@ -149,6 +149,24 @@ ERLANG_MK_COMMIT = rabbitmq-tmp
include rabbitmq-components.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 \
cluster_rename \
clustering_management \