mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Make sure to add .eunit as an absolute directory so that we avoid weirdness with code loading stuffs.
This commit is contained in:
parent
aea6f66939
commit
66906bc39e
1 changed files with 5 additions and 1 deletions
|
@ -98,6 +98,10 @@ clean(_Config, _File) ->
|
||||||
%% Internal functions
|
%% Internal functions
|
||||||
%% ===================================================================
|
%% ===================================================================
|
||||||
|
|
||||||
|
eunit_dir() ->
|
||||||
|
{ok, Cwd} = file:get_cwd(),
|
||||||
|
filename:join(Cwd, ?EUNIT_DIR).
|
||||||
|
|
||||||
perform_eunit(Config, Modules) ->
|
perform_eunit(Config, Modules) ->
|
||||||
%% suite defined, so only specify the module that relates to the
|
%% suite defined, so only specify the module that relates to the
|
||||||
%% suite (if any)
|
%% suite (if any)
|
||||||
|
@ -118,7 +122,7 @@ set_proc_env() ->
|
||||||
%% Save current code path and then prefix ?EUNIT_DIR on it so that our modules
|
%% Save current code path and then prefix ?EUNIT_DIR on it so that our modules
|
||||||
%% are found there
|
%% are found there
|
||||||
CodePath = code:get_path(),
|
CodePath = code:get_path(),
|
||||||
true = code:add_patha(?EUNIT_DIR),
|
true = code:add_patha(eunit_dir()),
|
||||||
|
|
||||||
%% Move down into ?EUNIT_DIR while we run tests so any generated files
|
%% Move down into ?EUNIT_DIR while we run tests so any generated files
|
||||||
%% are created there (versus in the source dir)
|
%% are created there (versus in the source dir)
|
||||||
|
|
Loading…
Reference in a new issue