【问题标题】:Is there a way to tell rebar not to run eunit tests for the dependencies?有没有办法告诉 rebar 不要为依赖项运行 eunit 测试?
【发布时间】:2011-10-23 23:18:39
【问题描述】:

运行时:

./rebar eunit

测试也针对外部依赖项运行。有没有办法改变这种行为?也许通过 rebar.config 文件?

【问题讨论】:

    标签: erlang rebar


    【解决方案1】:

    你也可以使用

    ./rebar eunit apps=your_app1,your_app2
    

    这将只为指定的应用程序运行 eunit 测试。

    【讨论】:

      【解决方案2】:

      还有一个选项可以仅为特定应用程序运行测试:

      ./rebar eunit app=app_name
      

      【讨论】:

      • 这实际上对我不起作用。我正在使用来自 GitHub 的最新钢筋快照。你运行的是哪个版本?
      • @Roberto Alio:奇怪。我的版本是“钢筋版本:2 日期:20110714_102521 vcs:git df86768”
      【解决方案3】:
      ./rebar eunit skip_deps=true
      

      (或recursive=false 最新版本)。

      【讨论】:

      • 酷。有用。不过,我尝试在 rebar.config ({skip_deps, true}. and {eunit, [{skip_deps, true}]}.) 中设置它,但没有成功。
      • 请注意./rebar clean get-deps compile eunit skip_deps=true 不起作用 -- 为什么不?因为rebar 也会跳过 compile 依赖项!不过,单独的命令 ./rebar clean get-deps compile./rebar eunit skip_deps=true 可以工作。
      猜你喜欢
      • 1970-01-01
      • 2018-03-03
      • 1970-01-01
      • 2017-09-13
      • 1970-01-01
      • 2012-06-24
      • 2020-04-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多