aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eunit.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-12-06 18:25:09 +0100
committerLoïc Hoguin <[email protected]>2018-12-06 18:25:09 +0100
commit754bad09421c70034242f4370c633e177a869151 (patch)
tree5d8e4faed1d6f204cd65a537f8f7eb58bacd975e /plugins/eunit.mk
parent44fe1e993f16c98ed41c01e4511c0367e14e9637 (diff)
downloaderlang.mk-754bad09421c70034242f4370c633e177a869151.tar.gz
erlang.mk-754bad09421c70034242f4370c633e177a869151.tar.bz2
erlang.mk-754bad09421c70034242f4370c633e177a869151.zip
Add cover support for PropEr and Triq
Diffstat (limited to 'plugins/eunit.mk')
-rw-r--r--plugins/eunit.mk21
1 files changed, 3 insertions, 18 deletions
diff --git a/plugins/eunit.mk b/plugins/eunit.mk
index 600010d..1847453 100644
--- a/plugins/eunit.mk
+++ b/plugins/eunit.mk
@@ -21,28 +21,13 @@ help::
# Plugin-specific targets.
define eunit.erl
- Enabled = case "$(COVER)" of
- "" -> false;
- _ ->
- case filelib:is_dir("ebin") of
- false -> false;
- true ->
- case cover:compile_beam_directory("ebin") of
- {error, _} -> halt(1);
- _ -> true
- end
- end
- end,
+ $(call cover.erl)
+ CoverSetup(),
case eunit:test($1, [$(EUNIT_OPTS)]) of
ok -> ok;
error -> halt(2)
end,
- case {Enabled, "$(COVER)"} of
- {false, _} -> ok;
- {_, ""} -> ok;
- _ ->
- cover:export("$(COVER_DATA_DIR)/eunit.coverdata")
- end,
+ CoverExport("$(COVER_DATA_DIR)/eunit.coverdata"),
halt()
endef