Bug 1285678 - Try to use adb root for emulator unit tests; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Mon, 27 Nov 2017 11:26:10 -0700
changeset 703826 cec895f7cedad28bea953572480acefd7bec4d08
parent 703825 191a00ee6f9b8fee0ac3ac7ae74adac85169d56a
child 703827 b991da77be9242769e1083c5929c78dbc10ebeb3
child 703941 f5f03ee9e6abf77964f8dc1b9d69c6ccd3f655fd
push id90984
push userbmo:gl@mozilla.com
push dateMon, 27 Nov 2017 20:54:52 +0000
reviewersjmaher
bugs1285678
milestone59.0a1
Bug 1285678 - Try to use adb root for emulator unit tests; r=jmaher
testing/mozharness/scripts/android_emulator_unittest.py
--- a/testing/mozharness/scripts/android_emulator_unittest.py
+++ b/testing/mozharness/scripts/android_emulator_unittest.py
@@ -372,17 +372,17 @@ class AndroidEmulatorTest(BlobUploadMixi
         for line in out.splitlines():
             if process_name in line:
                 pid = int(line.split(None, 1)[0])
                 self.info("Killing pid %d." % pid)
                 os.kill(pid, signal.SIGKILL)
 
     def _restart_adbd(self):
         self._run_with_timeout(30, [self.adb_path, 'kill-server'])
-        self._run_with_timeout(30, [self.adb_path, 'start-server'])
+        self._run_with_timeout(30, [self.adb_path, 'root'])
 
     def _screenshot(self, prefix):
         """
            Save a screenshot of the entire screen to the blob upload directory.
         """
         dirs = self.query_abs_dirs()
         utility = os.path.join(self.xre_path, "screentopng")
         if not os.path.exists(utility):