Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4d0722d authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am a9456438: Merge "Fix test_adb.py against production builds."

* commit 'a9456438':
  Fix test_adb.py against production builds.
parents 439cdfd0 a9456438
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -249,7 +249,8 @@ class AdbBasic(unittest.TestCase):


    def _test_root(self):
    def _test_root(self):
        adb = AdbWrapper()
        adb = AdbWrapper()
        adb.root()
        if "adbd cannot run as root in production builds" in adb.root():
            return
        adb.wait()
        adb.wait()
        self.assertEqual("root", adb.shell("id -un").strip())
        self.assertEqual("root", adb.shell("id -un").strip())


@@ -317,16 +318,13 @@ class AdbBasic(unittest.TestCase):


        Bug: http://b/19735063
        Bug: http://b/19735063
        """
        """
        output = AdbWrapper().shell("uname");
        output = AdbWrapper().shell("uname")
        if sys.platform == 'win32':
        if sys.platform == 'win32':
            # adb.exe running on Windows does translation to the Windows \r\n
            # adb.exe running on Windows does translation to the Windows \r\n
            # convention, so we should expect those chars.
            # convention, so we should expect those chars.
            self.assertTrue(output.endswith("\r\n"));
            self.assertEqual(output, "Linux\r\n")
            # If the server outputs \r\n and adb.exe translates that to \r\r\n
            # we want to catch that server problem.
            self.assertFalse(output.endswith("\r\r\n"));
        else:
        else:
            self.assertFalse(output.endswith("\r\n"))
            self.assertEqual(output, "Linux\n")




class AdbFile(unittest.TestCase):
class AdbFile(unittest.TestCase):