From 9fba03c8232ed056d2a4cde8942d4b0723eadc93 Mon Sep 17 00:00:00 2001 From: Vicamo Yang Date: Wed, 9 Apr 2014 10:14:07 +0800 Subject: [PATCH] Bug 975442: recognize as emulator if device name begins with 'emulator'. r=jgriffin --- layout/tools/reftest/mach_commands.py | 2 +- testing/marionette/mach_commands.py | 2 +- testing/mochitest/mach_commands.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/tools/reftest/mach_commands.py b/layout/tools/reftest/mach_commands.py index 428e44a9299..9807633c808 100644 --- a/layout/tools/reftest/mach_commands.py +++ b/layout/tools/reftest/mach_commands.py @@ -364,7 +364,7 @@ class MachCommands(MachCommandBase): # they should be modified to work with all devices. def is_emulator(cls): """Emulator needs to be configured.""" - return cls.device_name in ('emulator', 'emulator-jb') + return cls.device_name.find('emulator') == 0 @CommandProvider diff --git a/testing/marionette/mach_commands.py b/testing/marionette/mach_commands.py index 468e5933b81..e49e73ca4b4 100644 --- a/testing/marionette/mach_commands.py +++ b/testing/marionette/mach_commands.py @@ -77,7 +77,7 @@ class B2GCommands(MachCommandBase): @CommandArgument('tests', nargs='*', metavar='TESTS', help='Path to test(s) to run.') 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' if self.substs.get('ENABLE_MARIONETTE') != '1': diff --git a/testing/mochitest/mach_commands.py b/testing/mochitest/mach_commands.py index 2efadc76b92..dc1080d74a7 100644 --- a/testing/mochitest/mach_commands.py +++ b/testing/mochitest/mach_commands.py @@ -637,7 +637,7 @@ class MachCommands(MachCommandBase): # they should be modified to work with all devices. def is_emulator(cls): """Emulator needs to be configured.""" - return cls.device_name in ('emulator', 'emulator-jb') + return cls.device_name.find('emulator') == 0 @CommandProvider