Bug 1028746 - Running mach mochitest-remote from gecko srcdir raises AttributeError instead of being helpful, r=gps, DONTBUILD, a=NPOTB
Bug 1028746 - Running mach mochitest-remote from gecko srcdir raises AttributeError instead of being helpful, r=gps, DONTBUILD, a=NPOTB
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -734,17 +734,20 @@ class MachCommands(MachCommandBase):
return mochitest.run_desktop_test(self._mach_context,
test_paths=test_paths, suite=flavor, **kwargs)
# TODO For now b2g commands will only work with the emulator,
# they should be modified to work with all devices.
def is_emulator(cls):
"""Emulator needs to be configured."""
- return cls.device_name.startswith('emulator')
+ try:
+ return cls.device_name.startswith('emulator')
+ except AttributeError:
+ return False
@CommandProvider
class B2GCommands(MachCommandBase):
"""So far these are only mochitest plain. They are
implemented separately because their command lines
are completely different.
"""