[erlang-questions] CT and test.config

Roberto Ostinelli roberto@REDACTED
Thu Apr 23 15:25:13 CEST 2015


Thank you for clarifying Peter. That was confusing.

On Thu, Apr 23, 2015 at 2:03 PM, Peter Andersson <peppe@REDACTED> wrote:

>
> Roberto, you can read about -erl_args here:
>
> http://www.erlang.org/doc/man/ct_run.html
>
> The CT flag config is unfortunately named, but we decided to keep the
> name and rely on the -erl_args feature. With -erl_args we don't have to
> prefix all CT flags in order to avoid possible clashes with erl flags
> (now and in the future).
>
> Best,
> Peter
>
> On 2015-04-23 13:53, Loïc Hoguin wrote:
> > ct_run -erl_args -config test.config
> >
> > On 04/23/2015 02:41 PM, Roberto Ostinelli wrote:
> > > All,
> > > I've got an app `myapp` which uses a standard `sys.config` file.
> > > I'd like to test it using Common Tests, with a test configuration file.
> > >
> > > I'm passing the variable `-config test.config` to ct_run.
> > >
> > > However, when I start my app from the Common Test suite
> > > `myapp_SUITE.erl` then the app fails to start because inside the app
> > > `application:get_env(myapp, mykey)` returns `undefined`. I can,
> however,
> > > read this variable with `ct:get_config({myapp, mykey})`.
> > >
> > > How am I supposed to use a custom `test.config` file that is loaded in
> > > ct_run *and* read by the app itself?
> > >
> > > I've spent almost a day on this and I'm honestly 5 minutes away from
> > > dropping all this in the dustbin and using an external test tool
> > > instead. Please help me stick to Erlang. :)
> > >
> > > r.
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > erlang-questions mailing list
> > > erlang-questions@REDACTED
> > > http://erlang.org/mailman/listinfo/erlang-questions
> > >
> >
>
> _______________________________________________
> 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/20150423/520b30cf/attachment.htm>


More information about the erlang-questions mailing list