OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 logging | 5 import logging |
6 import os | 6 import os |
7 import re | 7 import re |
8 import tempfile | 8 import tempfile |
9 | 9 |
10 from devil.android import device_errors | 10 from devil.android import device_errors |
11 from devil.android import ports | 11 from devil.android import ports |
12 from pylib import pexpect | 12 from pylib import pexpect |
13 from pylib.base import base_test_result | 13 from pylib.base import base_test_result |
14 from pylib.base import base_test_runner | 14 from pylib.base import base_test_runner |
15 from pylib.gtest import gtest_test_instance | 15 from pylib.gtest import gtest_test_instance |
16 from pylib.local import local_test_server_spawner | 16 from pylib.local import local_test_server_spawner |
17 from pylib.perf import perf_control | 17 from pylib.perf import perf_control |
18 | 18 |
| 19 |
19 # Test case statuses. | 20 # Test case statuses. |
20 RE_RUN = re.compile('\\[ RUN \\] ?(.*)\r\n') | 21 RE_RUN = re.compile('\\[ RUN \\] ?(.*)\r\n') |
21 RE_FAIL = re.compile('\\[ FAILED \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') | 22 RE_FAIL = re.compile('\\[ FAILED \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') |
22 RE_OK = re.compile('\\[ OK \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') | 23 RE_OK = re.compile('\\[ OK \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') |
23 | 24 |
24 # Test run statuses. | 25 # Test run statuses. |
25 RE_PASSED = re.compile('\\[ PASSED \\] ?(.*)\r\n') | 26 RE_PASSED = re.compile('\\[ PASSED \\] ?(.*)\r\n') |
26 RE_RUNNER_FAIL = re.compile('\\[ RUNNER_FAILED \\] ?(.*)\r\n') | 27 RE_RUNNER_FAIL = re.compile('\\[ RUNNER_FAILED \\] ?(.*)\r\n') |
27 # Signal handlers are installed before starting tests | 28 # Signal handlers are installed before starting tests |
28 # to output the CRASHED marker when a crash happens. | 29 # to output the CRASHED marker when a crash happens. |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 #override | 209 #override |
209 def TearDown(self): | 210 def TearDown(self): |
210 """Cleans up the test enviroment for the test suite.""" | 211 """Cleans up the test enviroment for the test suite.""" |
211 for s in self._servers: | 212 for s in self._servers: |
212 s.TearDown() | 213 s.TearDown() |
213 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 214 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
214 self._perf_controller.SetDefaultPerfMode() | 215 self._perf_controller.SetDefaultPerfMode() |
215 self.test_package.ClearApplicationState(self.device) | 216 self.test_package.ClearApplicationState(self.device) |
216 self.tool.CleanUpEnvironment() | 217 self.tool.CleanUpEnvironment() |
217 super(TestRunner, self).TearDown() | 218 super(TestRunner, self).TearDown() |
OLD | NEW |