aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eunit.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-01-16 00:58:53 +0100
committerLoïc Hoguin <[email protected]>2016-01-16 00:58:53 +0100
commit68423aca4037e795036ad396a0ee1e5d3aa25852 (patch)
tree3dc4406d37abb0a213150ba4d602c26c56d21bb6 /plugins/eunit.mk
parent87285ade2f4712060f44c464f63f77b9cb087d93 (diff)
downloaderlang.mk-68423aca4037e795036ad396a0ee1e5d3aa25852.tar.gz
erlang.mk-68423aca4037e795036ad396a0ee1e5d3aa25852.tar.bz2
erlang.mk-68423aca4037e795036ad396a0ee1e5d3aa25852.zip
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.
Diffstat (limited to 'plugins/eunit.mk')
-rw-r--r--plugins/eunit.mk5
1 files changed, 3 insertions, 2 deletions
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)')