mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Run eunit in .eunit dir to ensure any created/temporary files are created there
This commit is contained in:
parent
e86f82f10d
commit
537eaa3bba
1 changed files with 8 additions and 0 deletions
|
@ -85,10 +85,18 @@ eunit(Config, _File) ->
|
|||
ok
|
||||
end,
|
||||
|
||||
%% Move down into ?EUNIT_DIR while we run tests so any generated files
|
||||
%% are created there (versus in the source dir)
|
||||
Cwd = rebar_utils:get_cwd(),
|
||||
file:set_cwd(?EUNIT_DIR),
|
||||
|
||||
%% Run eunit
|
||||
EunitOpts = BaseOpts ++ rebar_config:get_list(Config, eunit_opts, []),
|
||||
EunitResult = (catch eunit:test(Modules, EunitOpts)),
|
||||
|
||||
%% Return to original working dir
|
||||
file:set_cwd(Cwd),
|
||||
|
||||
%% Analyze cover modules
|
||||
cover_analyze(Config, cover:modules()),
|
||||
|
||||
|
|
Loading…
Reference in a new issue