Bug 948992 - Copy the deviceSerial to ADB's device manager. r=jgriffin

This commit is contained in:
Nicolas B. Pierron 2013-12-12 06:35:00 -08:00
Родитель 4cd98a6cc1
Коммит 50418a12fc
2 изменённых файлов: 11 добавлений и 6 удалений

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

@ -634,12 +634,14 @@ class BaseMarionetteTestRunner(object):
logcat_dir=self.logcat_dir,
gecko_path=self.gecko_path,
symbols_path=self.symbols_path,
timeout=self.timeout)
timeout=self.timeout,
device_serial=self.device_serial)
else:
self.marionette = Marionette(host=host,
port=int(port),
baseurl=self.baseurl,
timeout=self.timeout)
timeout=self.timeout,
device_serial=self.device_serial)
elif self.emulator:
self.marionette = Marionette.getMarionetteOrExit(
emulator=self.emulator,
@ -653,7 +655,8 @@ class BaseMarionetteTestRunner(object):
gecko_path=self.gecko_path,
symbols_path=self.symbols_path,
timeout=self.timeout,
sdcard=self.sdcard)
sdcard=self.sdcard,
device_serial=self.device_serial)
else:
raise Exception("must specify binary, address or emulator")

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

@ -12,12 +12,11 @@ class B2GTestCaseMixin(object):
def __init__(self, *args, **kwargs):
self._device_manager = None
@property
def device_manager(self, *args, **kwargs):
def get_device_manager(self, *args, **kwargs):
if not self._device_manager:
dm_type = os.environ.get('DM_TRANS', 'adb')
if dm_type == 'adb':
self._device_manager = mozdevice.DeviceManagerADB()
self._device_manager = mozdevice.DeviceManagerADB(**kwargs)
elif dm_type == 'sut':
host = os.environ.get('TEST_DEVICE')
if not host:
@ -27,3 +26,6 @@ class B2GTestCaseMixin(object):
raise Exception('Unknown device manager type: %s' % dm_type)
return self._device_manager
@property
def device_manager(self):
return self.get_device_manager()