diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2016-03-02 11:06:17 -0500 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2016-03-02 11:06:17 -0500 |
commit | 76e1d89bac2742ca6973ce028dad5a43b1484637 (patch) | |
tree | b232261d17485f1f873c1e5c2fc934977df1e074 /src | |
parent | 0f3e7166a67d7322e303bf534102edf5a0333acd (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 'src')
-rw-r--r-- | src/rebar_prv_common_test.erl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl index 8c5c4fa..784b682 100644 --- a/src/rebar_prv_common_test.erl +++ b/src/rebar_prv_common_test.erl @@ -168,12 +168,15 @@ cfgopts(State) -> end. ensure_opts([], Acc) -> lists:reverse(Acc); -ensure_opts([{test_spec, _}|_Rest], _Acc) -> - ?PRV_ERROR({badconfig, "Test specs not supported. See http://www.rebar3.org/docs/running-tests#common-test"}); -ensure_opts([{cover, _}|_Rest], _Acc) -> - ?PRV_ERROR({badconfig, "Cover specs not supported. See http://www.rebar3.org/docs/running-tests#common-test"}); -ensure_opts([{auto_compile, _}|_Rest], _Acc) -> - ?PRV_ERROR({badconfig, "Auto compile not supported"}); +ensure_opts([{test_spec, _}|Rest], Acc) -> + ?WARN("Test specs not supported. See http://www.rebar3.org/docs/running-tests#common-test", []), + ensure_opts(Rest, Acc); +ensure_opts([{cover, _}|Rest], Acc) -> + ?WARN("Cover specs not supported. See http://www.rebar3.org/docs/running-tests#common-test", []), + ensure_opts(Rest, Acc); +ensure_opts([{auto_compile, _}|Rest], Acc) -> + ?WARN("Auto compile not supported", []), + ensure_opts(Rest, Acc); ensure_opts([{suite, Suite}|Rest], Acc) when is_integer(hd(Suite)) -> ensure_opts(Rest, [{suite, Suite}|Acc]); ensure_opts([{suite, Suite}|Rest], Acc) when is_atom(Suite) -> |