title: How do I convince Erlang's Common Test to spawn local nodes?
body: <p>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:</p>
  
  <pre><code>{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}.
  </code></pre>
  
  <p>Which works <em>okay</em>:</p>
  
  <pre><code>&gt; 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&gt; ct_master:run("itest/lk.spec").
  === Master Logdir ===
  /Users/blt/projects/us/troutwine/locker/logs
  === Master Logger process started ===
  &lt;0.41.0&gt;
  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 &lt;6888.38.0&gt; 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}]
  </code></pre>
  
  <p>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</p>
  
  <pre><code>{init, [a], [{node_start, [{callback_module, slave}
                             , {erl_flags, "-pa ../ebin/"}                                                                                                    
                             , {monitor_master, true}                                                                                                         
                            ]}]}.
  </code></pre>
  
  <p>the result is less than what I'd hoped for:</p>
  
  <pre><code>(ct@localhost)2&gt; ct_master:run("itest/lk.spec").
  === Master Logdir ===
  /Users/blt/projects/us/troutwine/locker/logs
  === Master Logger process started ===
  &lt;0.41.0&gt;
  
  =ERROR REPORT==== 7-Aug-2013::11:05:24 ===
  Error in process &lt;0.51.0&gt; 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... 
  </code></pre>
  
  <p>Am I doing anything obviously wrong here?</p>