Bug 996862 - Remove use of mozdevice's networktools. r=ahal

This commit is contained in:
William Lachance 2014-04-21 11:03:51 -04:00
Родитель d7b73f0310
Коммит d407cd825b
7 изменённых файлов: 9 добавлений и 13 удалений

Просмотреть файл

@ -13,7 +13,6 @@ import time
import traceback
from automation import Automation
from devicemanager import NetworkTools
from mozprocess import ProcessHandlerMixin
@ -129,10 +128,6 @@ class B2GRemoteAutomation(Automation):
return app, args
def getLanIp(self):
nettools = NetworkTools()
return nettools.getLanIp()
def waitForFinish(self, proc, utilityPath, timeout, maxTime, startTime,
debuggerInfo, symbolsPath):
""" Wait for tests to finish (as evidenced by a signature string

Просмотреть файл

@ -10,7 +10,7 @@ import shutil
import subprocess
from automation import Automation
from devicemanager import NetworkTools, DMError
from devicemanager import DMError
import mozcrash
# signatures for logcat messages that we don't care about much
@ -175,10 +175,6 @@ class RemoteAutomation(Automation):
# return app, ['--environ:NO_EM_RESTART=1'] + args
return app, args
def getLanIp(self):
nettools = NetworkTools()
return nettools.getLanIp()
def Process(self, cmd, stdout = None, stderr = None, env = None, cwd = None):
if stdout == None or stdout == -1 or stdout == subprocess.PIPE:
stdout = self._remoteLog

Просмотреть файл

@ -36,6 +36,7 @@ _HARNESS_FILES = \
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py \
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/droid.py \
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/Zeroconf.py \
$(topsrcdir)/testing/mozbase/moznetwork/moznetwork/moznetwork.py \
$(topsrcdir)/build/mobile/b2gautomation.py \
$(topsrcdir)/build/automationutils.py \
$(topsrcdir)/build/mobile/remoteautomation.py \

Просмотреть файл

@ -16,6 +16,7 @@ from runreftest import ReftestOptions
from automation import Automation
import devicemanager
import droid
import moznetwork
from remoteautomation import RemoteAutomation, fennecLogcatFilters
class RemoteOptions(ReftestOptions):
@ -53,7 +54,7 @@ class RemoteOptions(ReftestOptions):
self.add_option("--remote-webserver", action="store",
type = "string", dest = "remoteWebServer",
help = "IP Address of the webserver hosting the reftest content")
defaults["remoteWebServer"] = automation.getLanIp()
defaults["remoteWebServer"] = moznetwork.get_ip()
self.add_option("--http-port", action = "store",
type = "string", dest = "httpPort",

Просмотреть файл

@ -20,6 +20,7 @@ from remotereftest import ReftestServer
from mozdevice import DeviceManagerADB, DMError
from marionette import Marionette
import moznetwork
class B2GOptions(ReftestOptions):
@ -142,7 +143,7 @@ class B2GOptions(ReftestOptions):
if options.remoteWebServer == None:
if os.name != "nt":
options.remoteWebServer = self.automation.getLanIp()
options.remoteWebServer = moznetwork.get_ip()
else:
print "ERROR: you must specify a --remote-webserver=<ip address>\n"
return None

Просмотреть файл

@ -25,6 +25,7 @@ SERV_FILES = \
$(topsrcdir)/testing/mozbase/manifestdestiny/manifestparser/manifestparser.py \
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/droid.py \
$(topsrcdir)/testing/mozbase/mozdevice/mozdevice/Zeroconf.py \
$(topsrcdir)/testing/mozbase/moznetwork/moznetwork/moznetwork.py \
$(topsrcdir)/build/automationutils.py \
$(topsrcdir)/build/mobile/remoteautomation.py \
gen_template.pl \

Просмотреть файл

@ -25,6 +25,7 @@ import droid
import manifestparser
import mozinfo
import mozlog
import moznetwork
SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
log = mozlog.getLogger('Mochi-Remote')
@ -131,7 +132,7 @@ class RemoteOptions(MochitestOptions):
if options.remoteWebServer == None:
if os.name != "nt":
options.remoteWebServer = automation.getLanIp()
options.remoteWebServer = moznetwork.get_ip()
else:
log.error("you must specify a --remote-webserver=<ip address>")
return None