From 945543da19facd2dc7d9284a2df3e934f28800db Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Wed, 25 Mar 2015 06:38:00 -0700 Subject: execute `cover` task as `test` profile and write generated data to the appropriate `_build` dir --- src/rebar_prv_cover.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/rebar_prv_cover.erl b/src/rebar_prv_cover.erl index d6e18dc..45d5b81 100644 --- a/src/rebar_prv_cover.erl +++ b/src/rebar_prv_cover.erl @@ -29,7 +29,8 @@ init(State) -> {example, "rebar3 cover"}, {short_desc, "Perform coverage analysis."}, {desc, ""}, - {opts, cover_opts(State)}])), + {opts, cover_opts(State)}, + {profiles, [test]}])), {ok, State1}. -spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}. @@ -333,7 +334,8 @@ verbose(State) -> end. cover_dir(State) -> - rebar_state:get(State, cover_data_dir, filename:join(["_build", "cover"])). + rebar_state:get(State, cover_data_dir, filename:join([rebar_dir:base_dir(State), + "cover"])). cover_opts(_State) -> [{reset, $r, "reset", boolean, help(reset)}, -- cgit v1.1