セレンテストを実行するための次のcakefileタスクがあります。これは正常に実行され、テストの最後に到達しますが、終了しません。
muffin = require 'muffin'
wrench = require 'wrench'
http = require 'http'
fs = require 'fs'
spawn = require('child_process').spawn
exec = require('child_process').exec
task 'selenium', 'run selenium tests', (options) ->
sel = require './test/selenium'
app = spawn 'node', ['app.js']
app.stdout.on 'data', (data) ->
if /listening on port/.test data
selenium = spawn 'selenium'
selenium.stdout.on 'data', (data) ->
console.log 'stdout: ' + data
if /Started.*jetty.Server/.test data
sel.run ->
app.stdin.end()
selenium.stdin.end()
console.log 'completed Selenium Tests'
タスクを終了するように指示する方法はありますか?「完了したSeleniumテスト」がコンソールに記録されます。