Question

I'd like to have Common Test spin up some local nodes to run suites. To that end, I've got the 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 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}]

without, obviously, running any tests on the extra local node. Now, when I uncomment the extra configuration in the spec so that it looks like

{init, [a], [{node_start, [{callback_module, slave}
                           , {erl_flags, "-pa ../ebin/"}                                                                                                    
                           , {monitor_master, true}                                                                                                         
                          ]}]}.

the result is less than what 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' 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... 

Am I doing anything obviously wrong here?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top