testing - How do I convince Erlang's Common Test to spawn local nodes? -
i'd have common test spin local nodes run suites. end, i've got following spec file:
{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}.
which works okay:
> 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 ^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 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 /users/blt/projects/us/troutwine/locker) common test: running make in test directories... including 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}]
without, obviously, running tests on local node. now, when uncomment configuration in spec looks like
{init, [a], [{node_start, [{callback_module, slave} , {erl_flags, "-pa ../ebin/"} , {monitor_master, true} ]}]}.
the result less i'd hoped for:
(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' 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...
am doing wrong here?
Comments
Post a Comment