idubrov/covertool — pull request #10 by bosqueviejo (2013-03-21 13:52:32+00:00)
Title: Fix race condition in cover.erl

Erlang R15B02 and R16B has a race condition in cover.erl, when a project with several applications in the apps directory is launched throught rebar with eunit, often crash with this message:

```erlang
ERROR: eunit failed while processing /home/manuel/Proyectos/myproject/apps/app2: {'EXIT',
{{badmatch,
{error,
{badarg,
[{ets,new,
[cover_internal_data_table,
[set,public,named_table,{write_concurrency,true}]],
[]},
{cover,init_main,1,[{file,"cover.erl"},{line,565}]}]}}},
[{rebar_eunit,cover_init,2,[{file,"src/rebar_eunit.erl"},{line,445}]},
{rebar_eunit,run_eunit,3,[{file,"src/rebar_eunit.erl"},{line,127}]},
{rebar_core,run_modules,4,[{file,"src/rebar_core.erl"},{line,405}]},
{rebar_core,execute,5,[{file,"src/rebar_core.erl"},{line,334}]},
{rebar_core,process_dir1,6,[{file,"src/rebar_core.erl"},{line,197}]},
{rebar_core,process_each,5,[{file,"src/rebar_core.erl"},{line,268}]},
{rebar_core,process_dir1,6,[{file,"src/rebar_core.erl"},{line,173}]},
{rebar_core,process_commands,2,
[{file,"src/rebar_core.erl"},{line,61}]}]}}
```
Adding cover.erl to the "src" directory fix the issue.