[erlang-questions] Apply Erlang configuration file (for multiple applications) to Common Test with rebar

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Tue May 12 17:21:08 CEST 2015


I think my solutions would be something along the lines of:

setup_app(App, Config) ->
  application:load(App),
  [application:set_env(App, Par, Val) || C <- ?config(App, Config), {Par,
Val} <- C],
  application:start(App).

This makes the configuration of the application part of the code, which
means it is much easier to parameterize the configuration later on when
needed. A static configuration file means you have to re-run CT for each
test you want to make with a new configuration, but this allows you to
change the configuration as you go along. It also cuts down on the command
line configuration considerable, since you only need a single configuration
now.

On Mon, May 11, 2015 at 7:37 PM, Luis Gerhorst <
erlang-questions-mailing-list@REDACTED> wrote:

> Hi,
> I've already posted this question on Stack Overflow but nobody has
> answered it. Maybe anyone here know's how I can do that:
>
>
> http://stackoverflow.com/questions/30161772/apply-erlang-configuration-file-for-multiple-applications-to-common-test-with
>
> If you know an answer / need more information but don't have a Stack
> Exchange account you can of course also answer on the mailing list.
>
> Thank you very much and best regards,
> Luis
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>


-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150512/2f702d78/attachment.htm>


More information about the erlang-questions mailing list