diff options
author | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2016-08-27 13:22:41 -0700 |
---|---|---|
committer | alisdair sullivan <alisdairsullivan@yahoo.ca> | 2016-08-27 13:22:41 -0700 |
commit | 7e554d06978ac52a4e56b48f67819af356a3279b (patch) | |
tree | 30a39168e1768ac071ac4f78d9b6d8a5fece787f /src | |
parent | 4347f48e7fc7f0939b37fe984f1286f332735630 (diff) |
reset accumulated coverdata on writing out to disk. this prevents
provider chains like `eunit, ct, proper` from misreporting cover
stats from providers later in the sequence
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_prv_cover.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rebar_prv_cover.erl b/src/rebar_prv_cover.erl index 7c2597b..401c331 100644 --- a/src/rebar_prv_cover.erl +++ b/src/rebar_prv_cover.erl @@ -376,6 +376,8 @@ write_coverdata(State, Task) -> ExportFile = filename:join([DataDir, atom_to_list(Task) ++ ".coverdata"]), case cover:export(ExportFile) of ok -> + %% dump accumulated coverdata after writing + ok = cover:reset(), ?DEBUG("Cover data written to ~p.", [ExportFile]); {error, Reason} -> ?WARN("Cover data export failed: ~p", [Reason]) |