繁体   English   中英

多个应用程序的Eunit错误

[英]Eunit error with multiple apps

我有以下目录结构:

myapp
├── apps
│   ├── myapp
│   ├── myotherapp
│   └── myapp_common
├── deps
│   ├── cowboy
......

我在主要myapp目录中使用钢筋运行eunit,如下所示:

./rebar skip_deps=true eunit

它可以为apps/三个应用正确运行eunit。 之后,它尝试在父myapp目录中运行eunit并引发以下错误:

......
==> myapp (eunit)
ERROR: eunit failed while processing /home/msheikh/myapp: {'EXIT',{{badmatch,{error,{1,
                           "cp: missing destination file operand after `.eunit'\nTry `cp --help' for more information.\n"}}},
         [{rebar_file_utils,cp_r,2,[]},
          {rebar_eunit,eunit,2,[]},
          {rebar_core,run_modules,4,[]},
          {rebar_core,execute,4,[]},
          {rebar_core,process_dir,4,[]},
          {rebar_core,process_commands,2,[]},
          {rebar,main,1,[]},
          {escript,run,2,[{file,"escript.erl"},{line,727}]}]}}

问题:如何解决此问题或阻止eunit为父myapp目录运行?

myapp主目录中的rebar.config文件如下所示:

{lib_dirs, ["deps", "apps"]}.

{deps, [
        {lager, ".*", {git, "https://github.com/basho/lager.git", {branch, "master"}}},
        {jsx, ".*", {git, "git://github.com/talentdeficit/jsx.git", {tag, "v0.9.0"}}},
        {cowboy, "", {git, "git://github.com/extend/cowboy.git", {branch, "master"}}},
        ....
       ]}.

{require_otp_vsn, "R15"}.

{escript_incl_apps, [getopt]}.

{erl_opts, [
            debug_info, 
            warn_missing_spec,
            {parse_transform, lager_transform}
           ]}.

{eunit_opts, [verbose]}.

{validate_app_modules, false}.

{sub_dirs, [
            "apps/myapp/",
            "apps/myotherapp/",
            "apps/myapp_common/"]}.

我有相同的项目结构,并且有效。

  1. 您确定顶层目录中没有srctestebin文件夹吗?
  2. 如果没有,如果您mkdir .eunit会发生什么? (我不建议保留此设置,而是从那里寻找解决方案)。

暂无
暂无

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

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