Reputation: 91895
I'm using rebar
to compile my application. Actually, it's two applications:
deps/
apps/A/
apps/B/
apps/B/suites
...where B
depends on A
. This is correctly configured in apps/B/src/B.app.src
. However, when I attempt to run rebar ct
, it fails to test B
, reporting that it can't find A.app
.
Running rebar ct
in verbose mode shows that it's setting the code search path (-pa
) to include apps/B/ebin
, and deps/foo/ebin
, deps/bar/ebin
, etc.
It is not including apps/A/ebin
.
How do I use Common Test to test an Erlang "application" that's made up of multiple applications?
Upvotes: 1
Views: 765
Reputation: 1814
IMO, if B depends on A, I would have two separate tests. One for A and mention it deps section of B of rebar config and write separate test cases for B and run only for B so that application A modules would be automatically taken care by rebar.
Upvotes: 0
Reputation: 841
Add in apps/B/rebar.config
{lib_dirs, [
".."
]}.
or
{ct_extra_params, "-pa ../A/ebin"}.
Upvotes: 1