diff --git a/testing/marionette/client/marionette/runner/base.py b/testing/marionette/client/marionette/runner/base.py index 206811ec13e..b98f4650c31 100644 --- a/testing/marionette/client/marionette/runner/base.py +++ b/testing/marionette/client/marionette/runner/base.py @@ -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") diff --git a/testing/marionette/client/marionette/runner/mixins/b2g.py b/testing/marionette/client/marionette/runner/mixins/b2g.py index 8cbe388d152..9a48cf267e9 100644 --- a/testing/marionette/client/marionette/runner/mixins/b2g.py +++ b/testing/marionette/client/marionette/runner/mixins/b2g.py @@ -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()