Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unit testing 多个应用程序的Eunit错误_Unit Testing_Erlang_Otp_Rebar_Eunit - Fatal编程技术网

Unit testing 多个应用程序的Eunit错误

Unit testing 多个应用程序的Eunit错误,unit-testing,erlang,otp,rebar,eunit,Unit Testing,Erlang,Otp,Rebar,Eunit,我有以下目录结构: myapp ├── apps │   ├── myapp │   ├── myotherapp │   └── myapp_common ├── deps │   ├── cowboy ...... 我在主myapp目录中使用钢筋运行eunit,如下所示: ./rebar skip_deps=true eunit 它在apps/中为三个应用正确运行eunit。之后,它尝试在父myapp目录中运行eunit,并抛出以下错误: ...... ==> myapp (eun

我有以下目录结构:

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/"]}.

我有相同的项目结构,它是有效的

  • 您确定顶级目录中没有
    src
    test
    ebin
    文件夹吗
  • 如果没有,如果您
    mkdir.eunit
    ,会发生什么情况?(我不是建议保留这个,而是从那里寻找解决方案)

  • 我有相同的项目结构,它是有效的

  • 您确定顶级目录中没有
    src
    test
    ebin
    文件夹吗
  • 如果没有,如果您
    mkdir.eunit
    ,会发生什么情况?(我不是建议保留这个,而是从那里寻找解决方案)