繁体   English   中英

如何让Rebar在发布目录中运行Common Test?

[英]How can I make Rebar run Common Test in a release directory?

我有一个带有顶级版本目录的Rebar项目,该目录只包含组件应用程序作为依赖项,并包含reltool配置。

我的一些应用程序在test子目录中有通用测试套件,我可以使用rebar ct运行这些测试。

现在我想为整个版本创建一个Common Test套件。 但是,当我在顶级目录中运行rebar ct skip_deps=true时,我得到:

Command 'ct' not understood or not applicable

如何让Rebar运行我的测试?

Rebar有三组模块(参见rebar.app ):

  • any_dir_modules ,适用于项目中的任何目录;
  • app_dir模块,仅适用于包含与src/*.app.srcebin/*.app src/*.app.src匹配的文件的目录(请参阅rebar_app_utils:is_app_dir/1 );
  • rel_dir模块,仅适用于包含reltool.configreltool.config.script目录(请参阅rebar_rel_utils:is_rel_dir/1 )。

rebar_ct模块,负责运行常见的测试,是在app_dir类别,以及您的顶级版本目录因此没有资格。

你可以通过指定rebar_ct是一个插件来解决这个问题,因为插件绕过了模块类别机制。 rebar.config下行放在rebar.config

{plugins, [rebar_ct]}.

你会得到:

$ rebar ct skip_deps=true
==> foo (ct)
==> bar (ct)
==> my_rel (ct)
DONE.
Testing src.my_rel: TEST COMPLETE, 0 ok, 0 failed of 0 test cases

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM