summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rebar_core.erl3
-rw-r--r--src/rebar_eunit.erl6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/rebar_core.erl b/src/rebar_core.erl
index 3b4102e..750cea7 100644
--- a/src/rebar_core.erl
+++ b/src/rebar_core.erl
@@ -269,6 +269,7 @@ process_dir(Dir, ParentConfig, Commands) ->
ok = file:set_cwd(Dir),
%% Finally, process the current working directory
+ ?DEBUG("Commands: ~p Modules: ~p\n", [Commands, Modules]),
apply_commands(Commands, Modules, UpdatedConfig, ModuleSetFile),
%% Once we're all done processing, reset the code path to whatever
@@ -311,6 +312,8 @@ apply_commands([], _Modules, _Config, _ModuleFile) ->
apply_commands([Command | Rest], Modules, Config, ModuleFile) ->
case select_modules(Modules, Command, []) of
[] ->
+ ?CONSOLE("WARNING: ~p command does not apply to directory ~s\n",
+ [Command, rebar_utils:get_cwd()]),
apply_commands(Rest, Modules, Config, ModuleFile);
TargetModules ->
%% Provide some info on where we are
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)