aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eunit.mk
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/eunit.mk')
-rw-r--r--plugins/eunit.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/eunit.mk b/plugins/eunit.mk
index 9739e0e..af614f6 100644
--- a/plugins/eunit.mk
+++ b/plugins/eunit.mk
@@ -36,7 +36,7 @@ define eunit.erl
case "$(COVER)" of
"" -> ok;
_ ->
- cover:export("eunit.coverdata")
+ cover:export("$(COVER_DATA_DIR)/eunit.coverdata")
end,
halt()
endef
@@ -45,10 +45,10 @@ EUNIT_ERL_OPTS += -pa $(TEST_DIR) $(DEPS_DIR)/*/ebin $(APPS_DIR)/*/ebin $(CURDIR
ifdef t
ifeq (,$(findstring :,$(t)))
-eunit: test-build
+eunit: test-build cover-data-dir
$(gen_verbose) $(call erlang,$(call eunit.erl,['$(t)']),$(EUNIT_ERL_OPTS))
else
-eunit: test-build
+eunit: test-build cover-data-dir
$(gen_verbose) $(call erlang,$(call eunit.erl,fun $(t)/0),$(EUNIT_ERL_OPTS))
endif
else
@@ -58,7 +58,7 @@ EUNIT_TEST_MODS = $(notdir $(basename $(call core_find,$(TEST_DIR)/,*.erl)))
EUNIT_MODS = $(foreach mod,$(EUNIT_EBIN_MODS) $(filter-out \
$(patsubst %,%_tests,$(EUNIT_EBIN_MODS)),$(EUNIT_TEST_MODS)),'$(mod)')
-eunit: test-build $(if $(IS_APP),,apps-eunit)
+eunit: test-build $(if $(IS_APP),,apps-eunit) cover-data-dir
$(gen_verbose) $(call erlang,$(call eunit.erl,[$(call comma_list,$(EUNIT_MODS))]),$(EUNIT_ERL_OPTS))
ifneq ($(ALL_APPS_DIRS),)