summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2010-04-16 12:58:10 -0600
committerDave Smith <dizzyd@dizzyd.com>2010-04-16 12:58:10 -0600
commit66906bc39ef17badf904fd81ddf17cee660a5604 (patch)
treedc5662aa07c5fcd71c93a6c77c57ec9e8fcd7f0c
parentaea6f669395a8304d3b2daddbc1e1d71412c4f60 (diff)
Make sure to add .eunit as an absolute directory so that we avoid weirdness with code loading stuffs.
-rw-r--r--src/rebar_eunit.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index 33a6ba7..2f3da35 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -98,6 +98,10 @@ clean(_Config, _File) ->
%% Internal functions
%% ===================================================================
+eunit_dir() ->
+ {ok, Cwd} = file:get_cwd(),
+ filename:join(Cwd, ?EUNIT_DIR).
+
perform_eunit(Config, Modules) ->
%% suite defined, so only specify the module that relates to the
%% 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
%% are found there
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
%% are created there (versus in the source dir)