[erlang-questions] Common test with rebar3
Tristan Sloughter
t@REDACTED
Fri Jan 29 17:48:57 CET 2016
Please open an issue on github.com/rebar/rebar3
The quick fix is to do `rebar3 ct --suite test/my_SUITE`
But I don't like that it runs the test suite even when you have `rebar3
ct --suite my_SUITE`...
--
Tristan Sloughter
t@REDACTED
On Fri, Jan 29, 2016, at 09:39 AM, Trent Hampton wrote:
> Thank you in advance for any help on this one.
>
> Background:
> I have a simple module in ./src/adb.erl
> I have a simple common test suite in ./test/my_SUITE.erl
> rebar.config has no added config for common test.
>
> When
I run the common test suite below with 'rebar3 ct --suite my_SUITE' i
get a badmatch error indicating that the module has not been loaded.
Why? Do I need to preload the modules in the same project as the common
tests?
> The error is below.
>
> -module(my_SUITE).
> -compile(export_all).
>
> all() ->
> [mod_exists].
>
> mod_exists(_) ->
> % {module,mnesia} = code:load_file(mnesia),
> {module,adb} = code:load_file(adb).
>
> [root@REDACTED adb]# rebar3 ct --suite my_SUITE --config /opt/codecloud/adb/test/test.config
> ===> Verifying dependencies...
> ===> Running Common Test suites...
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> my_SUITE:mod_exists failed on line 9
> Reason: {badmatch,{error,nofile}}
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> %%% my_SUITE ==> mod_exists: FAILED
> %%% my_SUITE ==> {failed,{{badmatch,{error,nofile}},
> [{my_SUITE,mod_exists,1,
> [{file,"/opt/codecloud/adb/_build/test/extras/test/my_SUITE.erl"},
> {line,9}]},
> {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1408}]},
> {test_server,run_test_case_eval1,6,
> [{file,"test_server.erl"},{line,984}]},
> {test_server,run_test_case_eval,9,
> [{file,"test_server.erl"},{line,926}]}]}}
> Failed 1 tests. Passed 0 tests.
> Results written to "/opt/codecloud/adb/_build/test/logs/index.html".
> ===> Failures occured running tests: 1
> _________________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160129/da8895af/attachment.htm>
More information about the erlang-questions
mailing list