mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Bug 975085 - Don't create unnecessary devicemanager instance in b2g emulator tests, r=jgriffin
This commit is contained in:
parent
b173a3b9db
commit
2ccfc1e28c
@ -505,14 +505,16 @@ def run_remote_reftests(parser, options, args):
|
||||
marionette = Marionette.getMarionetteOrExit(**kwargs)
|
||||
auto.marionette = marionette
|
||||
|
||||
# create the DeviceManager
|
||||
kwargs = {'adbPath': options.adbPath,
|
||||
'deviceRoot': options.remoteTestRoot}
|
||||
if options.deviceIP:
|
||||
kwargs.update({'host': options.deviceIP,
|
||||
'port': options.devicePort})
|
||||
|
||||
dm = DeviceManagerADB(**kwargs)
|
||||
if options.emulator:
|
||||
dm = marionette.emulator.dm
|
||||
else:
|
||||
# create the DeviceManager
|
||||
kwargs = {'adbPath': options.adbPath,
|
||||
'deviceRoot': options.remoteTestRoot}
|
||||
if options.deviceIP:
|
||||
kwargs.update({'host': options.deviceIP,
|
||||
'port': options.devicePort})
|
||||
dm = DeviagerADB(**kwargs)
|
||||
auto.setDeviceManager(dm)
|
||||
|
||||
options = parser.verifyRemoteOptions(options)
|
||||
|
@ -310,13 +310,17 @@ def run_remote_mochitests(parser, options):
|
||||
|
||||
marionette = Marionette.getMarionetteOrExit(**kwargs)
|
||||
|
||||
# create the DeviceManager
|
||||
kwargs = {'adbPath': options.adbPath,
|
||||
'deviceRoot': options.remoteTestRoot}
|
||||
if options.deviceIP:
|
||||
kwargs.update({'host': options.deviceIP,
|
||||
'port': options.devicePort})
|
||||
dm = DeviceManagerADB(**kwargs)
|
||||
if options.emulator:
|
||||
dm = marionette.emulator.dm
|
||||
else:
|
||||
# create the DeviceManager
|
||||
kwargs = {'adbPath': options.adbPath,
|
||||
'deviceRoot': options.remoteTestRoot}
|
||||
if options.deviceIP:
|
||||
kwargs.update({'host': options.deviceIP,
|
||||
'port': options.devicePort})
|
||||
dm = DeviceManagerADB(**kwargs)
|
||||
|
||||
options = parser.verifyRemoteOptions(options)
|
||||
if (options == None):
|
||||
print "ERROR: Invalid options specified, use --help for a list of valid options"
|
||||
|
@ -183,13 +183,16 @@ def main():
|
||||
kwargs['connectToRunningEmulator'] = True
|
||||
marionette = Marionette(**kwargs)
|
||||
|
||||
# Create the DeviceManager instance
|
||||
kwargs = {'adbPath': options.adb_path}
|
||||
if options.deviceIP:
|
||||
kwargs['host'] = options.deviceIP
|
||||
kwargs['port'] = options.devicePort
|
||||
kwargs['deviceRoot'] = options.remoteTestRoot
|
||||
dm = devicemanagerADB.DeviceManagerADB(**kwargs)
|
||||
if options.emulator:
|
||||
dm = marionette.emulator.dm
|
||||
else:
|
||||
# Create the DeviceManager instance
|
||||
kwargs = {'adbPath': options.adb_path}
|
||||
if options.deviceIP:
|
||||
kwargs['host'] = options.deviceIP
|
||||
kwargs['port'] = options.devicePort
|
||||
kwargs['deviceRoot'] = options.remoteTestRoot
|
||||
dm = devicemanagerADB.DeviceManagerADB(**kwargs)
|
||||
|
||||
if not options.remoteTestRoot:
|
||||
options.remoteTestRoot = dm.getDeviceRoot()
|
||||
|
Loading…
x
Reference in New Issue
Block a user