首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >多个应用程序的Eunit错误

多个应用程序的Eunit错误
EN

Stack Overflow用户
提问于 2012-04-18 16:35:39
回答 1查看 618关注 0票数 3

我有以下目录结构:

代码语言:javascript
复制
myapp
├── apps
│   ├── myapp
│   ├── myotherapp
│   └── myapp_common
├── deps
│   ├── cowboy
......

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

代码语言:javascript
复制
./rebar skip_deps=true eunit

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

代码语言:javascript
复制
......
==> 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目录运行?

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

代码语言:javascript
复制
{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/"]}.
EN

回答 1

Stack Overflow用户

发布于 2012-07-04 13:43:40

我的项目结构是一样的,而且很有效。

  1. 您确定在顶级目录中没有srctestebin文件夹吗?
  2. 如果没有,如果您mkdir .eunit怎么办?(我不是建议保留这个,而是从那里寻找一个解决方案)。
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10213901

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档