From 0461729fd923f01796510f93f03ad6c848e6c73e Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Thu, 5 Nov 2015 00:38:06 -0800 Subject: calculate coverage info as late as possible in ct provider execution --- src/rebar_prv_common_test.erl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl index 7a088e5..977a5f6 100644 --- a/src/rebar_prv_common_test.erl +++ b/src/rebar_prv_common_test.erl @@ -77,11 +77,12 @@ run_tests(State, Opts) -> Opts2 = turn_off_auto_compile(Opts1), ?DEBUG("ct_opts ~p", [Opts2]), {RawOpts, _} = rebar_state:command_parsed_args(State), - ok = maybe_write_coverdata(State), - case proplists:get_value(verbose, RawOpts, false) of + Result = case proplists:get_value(verbose, RawOpts, false) of true -> run_test_verbose(Opts2); false -> run_test_quiet(Opts2) - end. + end, + ok = maybe_write_coverdata(State), + Result. -spec format_error(any()) -> iolist(). format_error({error, Reason}) -> -- cgit v1.1