summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Lazu <gerhard@rabbitmq.com>2017-08-22 10:18:05 -0700
committerGerhard Lazu <gerhard@lazu.co.uk>2017-08-22 19:13:45 +0100
commitc89e694abddc7df23ec1da180ddfbfe4909e97ab (patch)
treec92c58b155a00fc1555f4b9fd43c86e5e9ccfac0
parent42b8137f316a887c07a7d711b2f08534fc5d414c (diff)
downloadrabbitmq-server-git-c89e694abddc7df23ec1da180ddfbfe4909e97ab.tar.gz
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>
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 46de9c6a38..3e3f3b23e9 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \