OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 """Runs linker tests on a particular device.""" | 5 """Runs linker tests on a particular device.""" |
6 | 6 |
7 import logging | 7 import logging |
8 import os.path | 8 import os.path |
9 import sys | 9 import sys |
| 10 import time |
10 import traceback | 11 import traceback |
11 | 12 |
12 from pylib import constants | 13 from pylib import constants |
13 from pylib.base import base_test_result | 14 from pylib.base import base_test_result |
14 from pylib.base import base_test_runner | 15 from pylib.base import base_test_runner |
15 from pylib.linker import test_case | |
16 from pylib.utils import apk_helper | 16 from pylib.utils import apk_helper |
17 | 17 |
| 18 import test_case |
| 19 |
18 | 20 |
19 # Name of the Android package to install for this to work. | 21 # Name of the Android package to install for this to work. |
20 _PACKAGE_NAME = 'ChromiumLinkerTest' | 22 _PACKAGE_NAME = 'ChromiumLinkerTest' |
21 | 23 |
22 | 24 |
23 class LinkerExceptionTestResult(base_test_result.BaseTestResult): | 25 class LinkerExceptionTestResult(base_test_result.BaseTestResult): |
24 """Test result corresponding to a python exception in a host-custom test.""" | 26 """Test result corresponding to a python exception in a host-custom test.""" |
25 | 27 |
26 def __init__(self, test_name, exc_info): | 28 def __init__(self, test_name, exc_info): |
27 """Constructs a LinkerExceptionTestResult object. | 29 """Constructs a LinkerExceptionTestResult object. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 test.tagged_name) | 96 test.tagged_name) |
95 exc_info = sys.exc_info() | 97 exc_info = sys.exc_info() |
96 results = base_test_result.TestRunResults() | 98 results = base_test_result.TestRunResults() |
97 results.AddResult(LinkerExceptionTestResult( | 99 results.AddResult(LinkerExceptionTestResult( |
98 test.tagged_name, exc_info)) | 100 test.tagged_name, exc_info)) |
99 | 101 |
100 if not results.DidRunPass(): | 102 if not results.DidRunPass(): |
101 return results, test | 103 return results, test |
102 else: | 104 else: |
103 return results, None | 105 return results, None |
OLD | NEW |