Bug 823222 - We should check the host/port before running tests, r=mdas

This commit is contained in:
Malini Das 2013-06-06 11:10:15 -04:00
parent 1e31144ef0
commit e551ace597

View File

@ -19,6 +19,7 @@ import xml.dom.minidom as dom
from manifestparser import TestManifest
from mozhttpd import MozHttpd
from telnetlib import Telnet
from marionette import Marionette
from marionette_test import MarionetteJSTestCase, MarionetteTestCase
@ -266,7 +267,12 @@ class MarionetteTestRunner(object):
timeout=self.timeout)
elif self.address:
host, port = self.address.split(':')
if self.emulator:
try:
#establish a telnet connection so we can vertify the data come back
tlconnection = Telnet(host, port)
except:
raise Exception("could not connect to given marionette host/port")
if self.emulator:
self.marionette = Marionette.getMarionetteOrExit(
host=host, port=int(port),
connectToRunningEmulator=True,