Bug 975442: recognize as emulator if device name begins with 'emulator'. r=jgriffin

This commit is contained in:
Vicamo Yang 2014-04-09 10:14:07 +08:00
Родитель 815a72b7fb
Коммит e58c108d84
3 изменённых файлов: 3 добавлений и 3 удалений

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

@ -364,7 +364,7 @@ class MachCommands(MachCommandBase):
# they should be modified to work with all devices. # they should be modified to work with all devices.
def is_emulator(cls): def is_emulator(cls):
"""Emulator needs to be configured.""" """Emulator needs to be configured."""
return cls.device_name in ('emulator', 'emulator-jb') return cls.device_name.find('emulator') == 0
@CommandProvider @CommandProvider

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

@ -77,7 +77,7 @@ class B2GCommands(MachCommandBase):
@CommandArgument('tests', nargs='*', metavar='TESTS', @CommandArgument('tests', nargs='*', metavar='TESTS',
help='Path to test(s) to run.') help='Path to test(s) to run.')
def run_marionette_webapi(self, tests, emulator=None, testtype=None): def run_marionette_webapi(self, tests, emulator=None, testtype=None):
if not emulator and self.device_name in ('emulator', 'emulator-jb'): if not emulator and self.device_name.find('emulator') == 0:
emulator='arm' emulator='arm'
if self.substs.get('ENABLE_MARIONETTE') != '1': if self.substs.get('ENABLE_MARIONETTE') != '1':

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

@ -637,7 +637,7 @@ class MachCommands(MachCommandBase):
# they should be modified to work with all devices. # they should be modified to work with all devices.
def is_emulator(cls): def is_emulator(cls):
"""Emulator needs to be configured.""" """Emulator needs to be configured."""
return cls.device_name in ('emulator', 'emulator-jb') return cls.device_name.find('emulator') == 0
@CommandProvider @CommandProvider