Bug 1028746 - Running mach mochitest-remote from gecko srcdir raises AttributeError instead of being helpful, r=gps, DONTBUILD, a=NPOTB
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 24 Jun 2014 13:47:19 -0400
changeset 190553 bd0a35e183157e90843eb267ed039145e852d721
parent 190552 b8ed1bc7528b1cad028ae531f8f2e8f08715a19a
child 190554 a4e5613dfcff638c72c5c2c307c96823c969172c
push idunknown
push userunknown
push dateunknown
reviewersgps, DONTBUILD, NPOTB
bugs1028746
milestone33.0a1
Bug 1028746 - Running mach mochitest-remote from gecko srcdir raises AttributeError instead of being helpful, r=gps, DONTBUILD, a=NPOTB
testing/mochitest/mach_commands.py
--- 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.
     """