OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Run specific test on specific environment.""" | 5 """Run specific test on specific environment.""" |
6 | 6 |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import tempfile | 9 import tempfile |
10 | 10 |
| 11 from devil.android import apk_helper |
11 from pylib import constants | 12 from pylib import constants |
12 from pylib.base import base_test_result | 13 from pylib.base import base_test_result |
13 from pylib.remote.device import remote_device_test_run | 14 from pylib.remote.device import remote_device_test_run |
14 from pylib.utils import apk_helper | |
15 | 15 |
16 | 16 |
17 class RemoteDeviceInstrumentationTestRun( | 17 class RemoteDeviceInstrumentationTestRun( |
18 remote_device_test_run.RemoteDeviceTestRun): | 18 remote_device_test_run.RemoteDeviceTestRun): |
19 """Run instrumentation tests on a remote device.""" | 19 """Run instrumentation tests on a remote device.""" |
20 | 20 |
21 #override | 21 #override |
22 def TestPackage(self): | 22 def TestPackage(self): |
23 return self._test_instance.test_package | 23 return self._test_instance.test_package |
24 | 24 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 if isinstance(result, base_test_result.BaseTestResult): | 67 if isinstance(result, base_test_result.BaseTestResult): |
68 r.AddResult(result) | 68 r.AddResult(result) |
69 elif isinstance(result, list): | 69 elif isinstance(result, list): |
70 r.AddResults(result) | 70 r.AddResults(result) |
71 else: | 71 else: |
72 raise Exception('Unexpected result type: %s' % type(result).__name__) | 72 raise Exception('Unexpected result type: %s' % type(result).__name__) |
73 | 73 |
74 self._DetectPlatformErrors(r) | 74 self._DetectPlatformErrors(r) |
75 return r | 75 return r |
OLD | NEW |