Esempio n. 1
0
    def testSmallResponseShell(self):
        command = 'keepin it real'
        response = 'word.'
        usb = self._ExpectCommand('shell', command, response)

        adb_commands = self._Connect(usb)
        self.assertEqual(response, adb_commands.Shell(command))
Esempio n. 2
0
    def testBigResponseShell(self):
        command = 'keepin it real big'
        # The data_sample doesn't have to be big, the point is that it just concatenates
        # the data_sample from different WRTEs together.
        responses = ['other stuff, ', 'and some words.']

        usb = self._ExpectCommand('shell', command, *responses)

        adb_commands = self._Connect(usb)
        self.assertEqual(''.join(responses), adb_commands.Shell(command))
Esempio n. 3
0
 def _run_shell(self, cmd, timeout_ms=None):
   tcp = self._ExpectCommand(b'shell', cmd)
   adb_commands = self._Connect(tcp)
   adb_commands.Shell(cmd, timeout_ms=timeout_ms)