| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import fnmatch | 5 import fnmatch |
| 6 import imp | 6 import imp |
| 7 import logging | 7 import logging |
| 8 import posixpath | 8 import posixpath |
| 9 import signal | 9 import signal |
| 10 import thread | 10 import thread |
| 11 import threading | 11 import threading |
| 12 | 12 |
| 13 from devil.utils import signal_handler | 13 from devil.utils import signal_handler |
| 14 from pylib import valgrind_tools | 14 from pylib import valgrind_tools |
| 15 from pylib.base import base_test_result | 15 from pylib.base import base_test_result |
| 16 from pylib.base import test_run | 16 from pylib.base import test_run |
| 17 from pylib.base import test_collection | 17 from pylib.base import test_collection |
| 18 from pylib.local.device import local_device_environment | 18 from pylib.local.device import local_device_environment |
| 19 from tracing_build import trace2html |
| 19 | 20 |
| 20 | 21 |
| 21 _SIGTERM_TEST_LOG = ( | 22 _SIGTERM_TEST_LOG = ( |
| 22 ' Suite execution terminated, probably due to swarming timeout.\n' | 23 ' Suite execution terminated, probably due to swarming timeout.\n' |
| 23 ' Your test may not have run.') | 24 ' Your test may not have run.') |
| 24 | 25 |
| 25 | 26 |
| 26 def IncrementalInstall(device, apk_helper, installer_script): | 27 def IncrementalInstall(device, apk_helper, installer_script): |
| 27 """Performs an incremental install. | 28 """Performs an incremental install. |
| 28 | 29 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 197 |
| 197 def _GetTests(self): | 198 def _GetTests(self): |
| 198 raise NotImplementedError | 199 raise NotImplementedError |
| 199 | 200 |
| 200 def _RunTest(self, device, test): | 201 def _RunTest(self, device, test): |
| 201 raise NotImplementedError | 202 raise NotImplementedError |
| 202 | 203 |
| 203 def _ShouldShard(self): | 204 def _ShouldShard(self): |
| 204 raise NotImplementedError | 205 raise NotImplementedError |
| 205 | 206 |
| 207 @staticmethod |
| 208 def _JsonToTrace(json_path, html_path): |
| 209 # First argument is call site. |
| 210 cmd = [__file__, json_path, '--title', 'Android Test Runner Trace', |
| 211 '--output', html_path] |
| 212 trace2html.Main(cmd) |
| 213 |
| 206 | 214 |
| 207 class NoTestsError(Exception): | 215 class NoTestsError(Exception): |
| 208 """Error for when no tests are found.""" | 216 """Error for when no tests are found.""" |
| OLD | NEW |