次のディレクトリ構造があります。
myapp
├── apps
│ ├── myapp
│ ├── myotherapp
│ └── myapp_common
├── deps
│ ├── cowboy
......
myapp
メインディレクトリで次のように rebar を使用して eunit を実行します。
./rebar skip_deps=true eunit
の 3 つのアプリに対して eunit を正しく実行しますapps/
。その後、親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
ディレクトリに対して実行されないようにするにはどうすればよいですか?
メイン ディレクトリのrebar.config
ファイルはmyapp
次のようになります。
{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/"]}.