Question

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?

Was it helpful?

Solution

Add in apps/B/rebar.config

{lib_dirs, [
    ".."
]}.

or

{ct_extra_params, "-pa ../A/ebin"}.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top