From 68423aca4037e795036ad396a0ee1e5d3aa25852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 16 Jan 2016 00:58:53 +0100 Subject: Fix eunit not running if there are no beams I'm not sure how to reproduce the issue some people experienced (OS, make version maybe? who knows) but I got a report that this fixes it. It's also definitely the "right" way to do this. --- plugins/eunit.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/eunit.mk b/plugins/eunit.mk index f6afa34..a2e22ff 100644 --- a/plugins/eunit.mk +++ b/plugins/eunit.mk @@ -52,8 +52,9 @@ eunit: test-build $(gen_verbose) $(call erlang,$(call eunit.erl,fun $(t)/0),$(EUNIT_ERL_OPTS)) endif else -EUNIT_EBIN_MODS = $(notdir $(basename $(call core_find,ebin/,*.beam))) -EUNIT_TEST_MODS = $(notdir $(basename $(call core_find,$(TEST_DIR)/,*.beam))) +EUNIT_EBIN_MODS = $(notdir $(basename $(ERL_FILES) $(BEAM_FILES))) +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)') -- cgit v1.2.3