diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-03-06 08:59:10 -0600 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-03-06 08:59:10 -0600 |
commit | 0638c85634f3f9f51f17f247a3376f72b2f4d2fa (patch) | |
tree | 7103bfe71b5b6f5298192ad1481e38943726e895 /test | |
parent | 67aca881c1ad5f3bb3f10c28bc0bc04c45d09407 (diff) |
store base opts after initialization of providers
Diffstat (limited to 'test')
-rw-r--r-- | test/rebar_profiles_SUITE.erl | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/test/rebar_profiles_SUITE.erl b/test/rebar_profiles_SUITE.erl index 55ab3d7..a4f926e 100644 --- a/test/rebar_profiles_SUITE.erl +++ b/test/rebar_profiles_SUITE.erl @@ -167,8 +167,11 @@ test_profile_applied_at_completion(Config) -> Vsn = rebar_test_utils:create_random_vsn(), rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]), + RebarConfig = [{erl_opts, [{d, some_define}]}], + rebar_test_utils:create_config(AppDir, RebarConfig), + {ok, State} = rebar_test_utils:run_and_check(Config, - [], + RebarConfig, ["eunit"], return), @@ -183,7 +186,10 @@ test_profile_applied_before_compile(Config) -> Vsn = rebar_test_utils:create_random_vsn(), rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]), - rebar_test_utils:run_and_check(Config, [], ["eunit"], {ok, [{app, Name}]}), + RebarConfig = [{erl_opts, [{d, some_define}]}], + rebar_test_utils:create_config(AppDir, RebarConfig), + + rebar_test_utils:run_and_check(Config, RebarConfig, ["eunit"], {ok, [{app, Name}]}), S = list_to_atom("not_a_real_src_" ++ Name), true = lists:member({d, 'TEST'}, proplists:get_value(options, S:module_info(compile), [])). @@ -195,7 +201,10 @@ test_profile_applied_before_eunit(Config) -> Vsn = rebar_test_utils:create_random_vsn(), rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]), - rebar_test_utils:run_and_check(Config, [], ["eunit"], {ok, [{app, Name}]}), + RebarConfig = [{erl_opts, [{d, some_define}]}], + rebar_test_utils:create_config(AppDir, RebarConfig), + + rebar_test_utils:run_and_check(Config, RebarConfig, ["eunit"], {ok, [{app, Name}]}), T = list_to_atom("not_a_real_src_" ++ Name ++ "_tests"), true = lists:member({d, 'TEST'}, proplists:get_value(options, T:module_info(compile), [])). @@ -207,8 +216,11 @@ test_profile_applied_to_apps(Config) -> Vsn = rebar_test_utils:create_random_vsn(), rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]), + RebarConfig = [{erl_opts, [{d, some_define}]}], + rebar_test_utils:create_config(AppDir, RebarConfig), + {ok, State} = rebar_test_utils:run_and_check(Config, - [], + RebarConfig, ["eunit"], return), |