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

Commit b7e79af0 authored by Spencer Low's avatar Spencer Low
Browse files

adb: win32: fix unittest exit code parsing



adb on Windows uses \r\n line-endings, so take that into account when
parsing output for the exit code.

Change-Id: I6a3d7c5ca455b0f0f7dae174866857e0aeee9926
Signed-off-by: default avatarSpencer Low <CompareAndSwap@gmail.com>
parent 428f626d
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -112,7 +112,8 @@ class AndroidDevice(object):
    _RETURN_CODE_PROBE_STRING = 'echo "{0}$?"'.format(_RETURN_CODE_DELIMITER)
    _RETURN_CODE_PROBE_STRING = 'echo "{0}$?"'.format(_RETURN_CODE_DELIMITER)


    # Maximum search distance from the output end to find the delimiter.
    # Maximum search distance from the output end to find the delimiter.
    _RETURN_CODE_SEARCH_LENGTH = len('{0}255\n'.format(_RETURN_CODE_DELIMITER))
    # adb on Windows returns \r\n even if adbd returns \n.
    _RETURN_CODE_SEARCH_LENGTH = len('{0}255\r\n'.format(_RETURN_CODE_DELIMITER))


    def __init__(self, serial, product=None):
    def __init__(self, serial, product=None):
        self.serial = serial
        self.serial = serial