summaryrefslogtreecommitdiff
path: root/src/rebar_prv_common_test.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-04-22 18:12:43 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-04-22 18:12:43 -0500
commit0537a0699d01e4ae61dd32db0d964224bf9a1f5e (patch)
tree7baa98fd379b9d6a7e892adbbd783f4b75117067 /src/rebar_prv_common_test.erl
parentde77225b49ca1af2e4a90f02ef248a15f1e74081 (diff)
parent12bd412c22fcfaeb752727a6c0098140704078f0 (diff)
Merge pull request #354 from tsloughter/track_code_path
Track code path
Diffstat (limited to 'src/rebar_prv_common_test.erl')
-rw-r--r--src/rebar_prv_common_test.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl
index 1d5806b..a398144 100644
--- a/src/rebar_prv_common_test.erl
+++ b/src/rebar_prv_common_test.erl
@@ -38,6 +38,9 @@ init(State) ->
-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.
do(State) ->
?INFO("Running Common Test suites...", []),
+
+ code:add_paths(rebar_state:code_paths(State, all_deps)),
+
%% Run ct provider prehooks
Providers = rebar_state:providers(State),
Cwd = rebar_dir:get_cwd(),
@@ -47,11 +50,14 @@ do(State) ->
{ok, State1} = Result ->
%% Run ct provider posthooks
rebar_hooks:run_all_hooks(Cwd, post, ?PROVIDER, Providers, State1),
+ rebar_utils:cleanup_code_path(rebar_state:code_paths(State1, default)),
Result;
?PRV_ERROR(_) = Error ->
+ rebar_utils:cleanup_code_path(rebar_state:code_paths(State, default)),
Error
catch
throw:{error, Reason} ->
+ rebar_utils:cleanup_code_path(rebar_state:code_paths(State, default)),
?PRV_ERROR(Reason)
end.