Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warn on incorrectly specified test options in rebar.config #922

Merged
merged 2 commits into from
Nov 16, 2015

Conversation

talentdeficit
Copy link
Contributor

when ct_opts, eunit_tests, eunit_first_files, ct_first_files, erl_first_files,
eunit_compile_opts, ct_compile_opts and erl_opts have values that are single non-list
terms warn and try wrapping them in a list when processing them in the eunit and ct
providers

before:

$ DEBUG=1 rebar3 ct
===> error: function_clause [{lists,sort,
                                     [#Fun<rebar_utils.1.98462181>,export_all],
                                     [{file,"lists.erl"},{line,963}]},
                                    {rebar_utils,tup_umerge,2,
                                     [{file,
                                       "/home/travis/build/rebar/rebar3/_build/default/lib/rebar/src/rebar_utils.erl"},
                                      {line,281}]},
                                    {dict,update_bkt,4,
                                     [{file,"dict.erl"},{line,319}]},
                                    {dict,update_bkt,4,
                                     [{file,"dict.erl"},{line,321}]},
                                    {dict,on_bucket,3,
                                     [{file,"dict.erl"},{line,409}]},
                                    {dict,update,4,
                                     [{file,"dict.erl"},{line,314}]},
                                    {dict,fold_bucket,3,
                                     [{file,"dict.erl"},{line,437}]},
                                    {dict,fold_seg,4,
                                     [{file,"dict.erl"},{line,433}]}]
===> Failed creating providers. Run with DEBUG=1 for stacktrace.

after:

$ rebar3 ct
===> Verifying dependencies...
===> Value `export_all' of option `ct_opts' is not a list, trying to adjust and continue
===> Compiling rebar
===> Running Common Test suites...

when `ct_opts`, `eunit_tests`, `eunit_first_files`, `ct_first_files`, `erl_first_files`,
`eunit_compile_opts`, `ct_compile_opts` and `erl_opts` have values that are single non-list
terms warn and try wrapping them in a list when processing them in the `eunit` and `ct`
providers
@ferd
Copy link
Collaborator

ferd commented Nov 15, 2015

I'd rather error out entirely than start mistakenly supporting half-broken configs. After that we commit to doing it for good, I'm not sure I like that entirely? I'm fully on board with the bad config detection though.

@tsloughter
Copy link
Collaborator

+1 to erroring

@talentdeficit
Copy link
Contributor Author

i'll change them to errors. needs significantly more work though. tomorrow

@talentdeficit
Copy link
Contributor Author

updated to error instead of warn. also changed a few older warnings (ct's test_spec and auto_compile) to errors for consistency

@tsloughter
Copy link
Collaborator

+1

ferd added a commit that referenced this pull request Nov 16, 2015
warn on incorrectly specified test options in `rebar.config`
@ferd ferd merged commit 160da47 into erlang:master Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants