我想让Common Test启动一些本地节点来运行套件。为此,我有以下规范文件:
{node, a, 'a@localhost'}.
{logdir, [a,master], "../logs/"}.
{init, [a], [{node_start, [{callback_module, slave}
%% , {erl_flags, "-pa ../ebin/"}
%% , {monitor_master, true}
]}]}.
{suites, [a], "." , all}.
哪个有用
> erl -sname ct@localhost
Erlang R15B03 (erts-5.9.3) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.9.3 (abort with ^G)
(ct@localhost)1> ct_master:run("itest/lk.spec").
=== Master Logdir ===
/Users/blt/projects/us/troutwine/locker/logs
=== Master Logger process started ===
<0.41.0>
Node a@localhost started successfully with callback slave
=== Cookie ===
'DJWDEGHCXBKRAYVPMHTX'
=== Starting Tests ===
Tests starting on: [a@localhost]
=== Test Info ===
Starting test(s) on a@localhost...
********** node_ctrl process <6888.38.0> started on a@localhost **********
Common Test starting (cwd is /Users/blt/projects/us/troutwine/locker)
Common Test: Running make in test directories...
Including the following directories:
[]
CWD set to: "/Users/blt/projects/us/troutwine/locker/logs/ct_run.a@localhost.2013-08-07_09.44.23"
TEST INFO: 1 test(s), 1 suite(s)
Testing locker.itest: Starting test (with repeated test cases)
- - - - - - - - - - - - - - - - - - - - - - - - - -
locker_SUITE:init_per_suite failed
Reason: {badmatch,{error,{"no such file or directory","locker.app"}}}
- - - - - - - - - - - - - - - - - - - - - - - - - -
Testing locker.itest: *** FAILED *** init_per_suite
Testing locker.itest: TEST COMPLETE, 0 ok, 0 failed, 100 skipped of 100 test cases
Updating /Users/blt/projects/us/troutwine/locker/logs/index.html... done
Updating /Users/blt/projects/us/troutwine/locker/logs/all_runs.html... done
=== Test Info ===
Test(s) on node a@localhost finished.
=== TEST RESULTS ===
a@localhost_____________________________{0,0,{0,100}}
=== Info ===
Updating log files
=== Info ===
[{"itest/lk.spec",ok}]
显然,没有在额外的本地节点上运行任何测试。现在,当我取消注释规范中的额外配置,使其看起来像
{init, [a], [{node_start, [{callback_module, slave}
, {erl_flags, "-pa ../ebin/"}
, {monitor_master, true}
]}]}.
结果低于我希望的结果:
(ct@localhost)2> ct_master:run("itest/lk.spec").
=== Master Logdir ===
/Users/blt/projects/us/troutwine/locker/logs
=== Master Logger process started ===
<0.41.0>
=ERROR REPORT==== 7-Aug-2013::11:05:24 ===
Error in process <0.51.0> on node 'ct@localhost' with exit value: {badarg,[{erlang,open_port,[{spawn,[101,114,108,32,45,100,101,116,97,99,104,101,100,32,45,110,111,105,110,112,117,116,32,45,109,97,115,116,101,114,32,99,116,64,108,111,99,97,108,104,111,115,116,32,32,45,115,110,97,109,101,32,97,64,108,111,99,97,108,104,111,115,116,32,45,115,32,115,108,97,118,101,32,115,108,97,118,101,95,115,116,97,114,116,32,99,116,64,108,111,99,97,108,104,111,115,116,32,115,108,97,118,101,95,119,97,105,116,101,114,95,48,32,{erl_flags,"-pa ../ebin/"},{monitor_master,true}]},[stream...
我在这里做了什么明显的错误吗?