             callback code, stdout, stderr
     child
 
-testSauceAppOnDriver = (desired, callback) ->
+testSauceAppOnDriver = (desired, opts, callback) ->
     driver = sauce.getDriver()
     stack = new utils.async.Stack
 


    run driver.init, [desired]

    if desired.browserName
        run driver.get, [APP_URL]
        logType = 'browser'
    else if desired.deviceName is 'Android Emulator'
        logType = 'logcat'
    else
        logType = 'syslog'

    if desired.browserName
        checkTestsFinished = ->

    runAndSaveApp = (absPath, callback) ->
        appChild = runApp absPath, callback

    stack.add buildApp, null, [absPath, [opts.platform, '--with-tests']]
    stack.add sauceConnectAndSave
    stack.add runAndSaveApp, null, [absPath]
    stack.add testSauceApp, null, [absPath, opts]

    stack.runAll (err1) ->
        appChild?.send 'terminate'
