summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2016-03-02 11:06:17 -0500
committerFred Hebert <mononcqc@ferd.ca>2016-03-02 11:06:17 -0500
commit76e1d89bac2742ca6973ce028dad5a43b1484637 (patch)
treeb232261d17485f1f873c1e5c2fc934977df1e074 /test
parent0f3e7166a67d7322e303bf534102edf5a0333acd (diff)
Take CT options errors and turn them to warnings
The idea is that given we accept arbitrary config items for CT, we should similarly be able to pass unsupported options and keep things running. However for unsupported options, a warning is very useful to have.
Diffstat (limited to 'test')
-rw-r--r--test/rebar_ct_SUITE.erl14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/rebar_ct_SUITE.erl b/test/rebar_ct_SUITE.erl
index 73473b2..0e0de2e 100644
--- a/test/rebar_ct_SUITE.erl
+++ b/test/rebar_ct_SUITE.erl
@@ -1045,13 +1045,13 @@ cfg_test_spec(Config) ->
Vsn = rebar_test_utils:create_random_vsn(),
rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
- RebarConfig = [{ct_opts, [{test_spec, "spec/foo.spec"}]}],
+ RebarConfig = [{ct_opts, [Opt = {test_spec, "spec/foo.spec"}]}],
{ok, State} = rebar_test_utils:run_and_check(C, RebarConfig, ["as", "test", "lock"], return),
- {error, {rebar_prv_common_test, Error}} = rebar_prv_common_test:prepare_tests(State),
+ {ok, TestOpts} = rebar_prv_common_test:prepare_tests(State),
- {badconfig, "Test specs not supported. See http://www.rebar3.org/docs/running-tests#common-test"} = Error.
+ false = lists:member(Opt, TestOpts).
cfg_cover_spec(Config) ->
C = rebar_test_utils:init_rebar_state(Config, "ct_cfg_cover_spec_opts_"),
@@ -1062,13 +1062,13 @@ cfg_cover_spec(Config) ->
Vsn = rebar_test_utils:create_random_vsn(),
rebar_test_utils:create_app(AppDir, Name, Vsn, [kernel, stdlib]),
- RebarConfig = [{ct_opts, [{cover, "spec/foo.spec"}]}],
+ RebarConfig = [{ct_opts, [Opt = {cover, "spec/foo.spec"}]}],
{ok, State} = rebar_test_utils:run_and_check(C, RebarConfig, ["as", "test", "lock"], return),
- {error, {rebar_prv_common_test, Error}} = rebar_prv_common_test:prepare_tests(State),
+ {ok, TestOpts} = rebar_prv_common_test:prepare_tests(State),
- {badconfig, "Cover specs not supported. See http://www.rebar3.org/docs/running-tests#common-test"} = Error.
+ false = lists:member(Opt, TestOpts).
cfg_atom_suites(Config) ->
C = rebar_test_utils:init_rebar_state(Config, "ct_cfg_atom_suites_"),
@@ -1163,4 +1163,4 @@ test_suite(Name) ->
io_lib:format("-module(~ts_SUITE).\n"
"-compile(export_all).\n"
"all() -> [some_test].\n"
- "some_test(_) -> ok.\n", [Name]). \ No newline at end of file
+ "some_test(_) -> ok.\n", [Name]).