From 70e18a0ffcaa7ab347798418b950252dc525f612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 6 Mar 2015 19:08:59 +0100 Subject: Fix an error message when there is no test/ folder --- plugins/eunit.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/eunit.mk b/plugins/eunit.mk index c59883d..3f198cb 100644 --- a/plugins/eunit.mk +++ b/plugins/eunit.mk @@ -9,6 +9,9 @@ ifeq ($(strip $(TEST_DIR)),) TAGGED_EUNIT_TESTS = {dir,"ebin"} else +ifeq ($(wildcard $(TEST_DIR)),) +TAGGED_EUNIT_TESTS = {dir,"ebin"} +else # All modules in TEST_DIR TEST_DIR_MODS = $(notdir $(basename $(shell find $(TEST_DIR) -type f -name *.beam))) # All modules in 'ebin' @@ -18,6 +21,7 @@ EUNIT_EBIN_MODS = $(notdir $(basename $(shell find ebin -type f -name *.beam))) EUNIT_MODS = $(filter-out $(patsubst %,%_tests,$(EUNIT_EBIN_MODS)),$(TEST_DIR_MODS)) TAGGED_EUNIT_TESTS = {dir,"ebin"} $(foreach mod,$(EUNIT_MODS),$(shell echo $(mod) | sed -e 's/\(.*\)/{module,\1}/g')) endif +endif EUNIT_OPTS ?= verbose -- cgit v1.2.3