summaryrefslogtreecommitdiff
path: root/src/rebar_prv_eunit.erl
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-05-22 20:46:03 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-05-22 20:46:03 -0500
commitd9bad345062ec29d748d77c1497232b769a379d0 (patch)
tree7b1f4a283dc00b61f49c21a06b4f054a13c317d3 /src/rebar_prv_eunit.erl
parentb4786b804c8b31a220e9daea753bd0ec3f7a62dd (diff)
parent8a50331898e3c5def85a3c7158c7cefe22a36a5f (diff)
Merge pull request #472 from tsloughter/refactor_hooks
move handling of undefined app state to function
Diffstat (limited to 'src/rebar_prv_eunit.erl')
-rw-r--r--src/rebar_prv_eunit.erl9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/rebar_prv_eunit.erl b/src/rebar_prv_eunit.erl
index 3ad593d..ff871c8 100644
--- a/src/rebar_prv_eunit.erl
+++ b/src/rebar_prv_eunit.erl
@@ -134,14 +134,7 @@ resolve_suites(State, Apps, RawOpts) ->
compile_tests(State, TestApps, Suites, RawOpts) ->
F = fun(AppInfo) ->
- AppDir = rebar_app_info:dir(AppInfo),
- S = case rebar_app_info:state(AppInfo) of
- undefined ->
- C = rebar_config:consult(AppDir),
- rebar_state:new(State, C, AppDir);
- AppState ->
- AppState
- end,
+ S = rebar_app_info:state_or_new(State, AppInfo),
ok = rebar_erlc_compiler:compile(replace_src_dirs(S),
ec_cnv:to_list(rebar_app_info:out_dir(AppInfo)))
end,