| Index: devil/devil/android/sdk/adb_wrapper_devicetest.py
|
| diff --git a/devil/devil/android/sdk/adb_wrapper_devicetest.py b/devil/devil/android/sdk/adb_wrapper_devicetest.py
|
| old mode 100644
|
| new mode 100755
|
| index 59755c00cbbef99eb7393da943d9dce4f7393881..3b037f3a6d06a5ddbbd6855d4fcc6dfadc8a125c
|
| --- a/devil/devil/android/sdk/adb_wrapper_devicetest.py
|
| +++ b/devil/devil/android/sdk/adb_wrapper_devicetest.py
|
| @@ -1,3 +1,5 @@
|
| +#!/usr/bin/env python
|
| +
|
| # Copyright 2013 The Chromium Authors. All rights reserved.
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
| @@ -44,6 +46,21 @@ class TestAdbWrapper(unittest.TestCase):
|
| with self.assertRaises(device_errors.AdbCommandFailedError):
|
| self._adb.Shell('echo test', expect_status=1)
|
|
|
| + def testPersistentShell(self):
|
| + # We need to access the device serial number here in order
|
| + # to create the persistent shell.
|
| + serial = self._adb.device_serial # pylint: disable=protected-access
|
| + with self._adb.PersistentShell(serial) as pshell:
|
| + (res1, code1) = pshell.RunCommand('echo TEST')
|
| + (res2, code2) = pshell.RunCommand('echo TEST2')
|
| + self.assertEqual(len(res1), 1)
|
| + self.assertEqual(len(res2), 2)
|
| + self.assertEqual(res1[0], 'TEST')
|
| + self.assertEqual(res2[0], '')
|
| + self.assertEqual(res2[1], 'TEST2')
|
| + self.assertEqual(code1, 0)
|
| + self.assertEqual(code2, 0)
|
| +
|
| def testPushLsPull(self):
|
| path = self._MakeTempFile('foo')
|
| device_path = '/data/local/tmp/testfile.txt'
|
|
|