How do I start an application (specifically telemetry) as part of rebar3 eunit?
In particular, I want it started unconditionally. I do not want to add setup fixtures to all of my tests.
This project currently uses erlang.mk. and it’s as simple as this:
EUNIT_ERL_OPTS = -eval 'application:ensure_all_started(telemetry)'
(although I’ve actually got EUNIT_ERL_OPTS = -s test_helper, because I start a couple of other things in test_helper:start/0).
I’ve tried various combinations of ERL_FLAGS (seems to be ignored) and ERL_AFLAGS and ERL_ZFLAGS, but the paths aren’t set correctly, or it just doesn’t work.
But that’s clunky anyway – can I do it with rebar.config?
I should note that I’ve got it listed in my .app.src file:
{applications, [
kernel,
stdlib,
telemetry
]},
…but that doesn’t work, because rebar3 eunit doesn’t start my application anyway (and nor should it, by default).