Skip to content

Commit e7c0e1e

Browse files
committed
Not all builders want to run all deps' tests
For example, some organisations do not use, nor have the time to maintain, some deps, like riak_ensemble. This change adds an argument `TEST_IGNORE` that will skip the eunit test running for the deps assigned to the variable. Example:: make test TEST_IGNORE="riak_ensemble yokozuna" Will run eunit, but skip those directories. Compile will still run.
1 parent ba59ff1 commit e7c0e1e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ERLANG_BIN = $(shell dirname $(shell which erl 2>/dev/null) 2>/dev/null)
77
REBAR ?= $(BASE_DIR)/rebar
88
OVERLAY_VARS ?=
99
SPECIAL_DEPS ?= meck hamcrest riak_ensemble webmachine
10+
TEST_IGNORE ?=
1011

1112
RIAK_CORE_STAT_PREFIX = riak
1213
export RIAK_CORE_STAT_PREFIX
@@ -60,11 +61,12 @@ testclean:
6061
# Test each dependency individually in its own VM
6162
test : deps compile testclean
6263
@$(foreach dep, \
63-
$(filter-out $(SPECIAL_DEPS), $(patsubst deps/%, %, $(wildcard deps/*))), \
64+
$(filter-out $(TEST_IGNORE), \
65+
$(filter-out $(SPECIAL_DEPS), $(patsubst deps/%, %, $(wildcard deps/*)))), \
6466
(cd deps/$(dep) && REBAR_DEPS_DIR=$(BASE_DIR)/deps/ ../../rebar eunit deps_dir=.. skip_deps=true) \
6567
|| echo "Eunit: $(dep) FAILED" >> $(TEST_LOG_FILE);)
6668
@$(foreach special, \
67-
$(SPECIAL_DEPS), \
69+
$(filter-out $(TEST_IGNORE), $(SPECIAL_DEPS)), \
6870
(cd deps/$(special) && make test) \
6971
|| echo "Eunit: $(special) FAILED" >> $(TEST_LOG_FILE);)
7072
./rebar eunit skip_deps=true

0 commit comments

Comments
 (0)