I have a Rebar project with a top-level release directory that just includes the component applications as dependencies and contains the reltool configuration.
Some of my applications have Common Test suites in test subdirectories, and I can run those tests with rebar ct.
Now I want to create a Common Test suite for the entire release. However, when I run rebar ct skip_deps=true in the top-level directory, I just get:
Command 'ct' not understood or not applicable
How can I make Rebar run my tests?
Rebar has three sets of modules (see rebar.app):
any_dir_modules, which apply to any directory in your project;app_dirmodules, which apply only to directories containing files matchingsrc/*.app.srcorebin/*.app(seerebar_app_utils:is_app_dir/1); andrel_dirmodules, which apply only to directories containingreltool.configorreltool.config.script(seerebar_rel_utils:is_rel_dir/1).The
rebar_ctmodule, which is responsible for running Common Test, is in theapp_dircategory, and your top-level release directory is thus not eligible.You can work around this by specifying that
rebar_ctis a plugin, since plugins bypass the module category mechanism. Put the following line in yourrebar.config:And you’ll get: