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 | 8 |
9 from pylib import pexpect | 9 from pylib import pexpect |
10 from pylib import ports | 10 from pylib import ports |
11 from pylib.base import base_test_result | 11 from pylib.base import base_test_result |
12 from pylib.base import base_test_runner | 12 from pylib.base import base_test_runner |
13 from pylib.device import device_errors | 13 from pylib.device import device_errors |
| 14 from pylib.gtest import gtest_test_instance |
14 from pylib.local import local_test_server_spawner | 15 from pylib.local import local_test_server_spawner |
15 from pylib.perf import perf_control | 16 from pylib.perf import perf_control |
16 | 17 |
17 # Test case statuses. | 18 # Test case statuses. |
18 RE_RUN = re.compile('\\[ RUN \\] ?(.*)\r\n') | 19 RE_RUN = re.compile('\\[ RUN \\] ?(.*)\r\n') |
19 RE_FAIL = re.compile('\\[ FAILED \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') | 20 RE_FAIL = re.compile('\\[ FAILED \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') |
20 RE_OK = re.compile('\\[ OK \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') | 21 RE_OK = re.compile('\\[ OK \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') |
21 | 22 |
22 # Test run statuses. | 23 # Test run statuses. |
23 RE_PASSED = re.compile('\\[ PASSED \\] ?(.*)\r\n') | 24 RE_PASSED = re.compile('\\[ PASSED \\] ?(.*)\r\n') |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 #override | 193 #override |
193 def TearDown(self): | 194 def TearDown(self): |
194 """Cleans up the test enviroment for the test suite.""" | 195 """Cleans up the test enviroment for the test suite.""" |
195 for s in self._servers: | 196 for s in self._servers: |
196 s.TearDown() | 197 s.TearDown() |
197 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 198 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
198 self._perf_controller.SetDefaultPerfMode() | 199 self._perf_controller.SetDefaultPerfMode() |
199 self.test_package.ClearApplicationState(self.device) | 200 self.test_package.ClearApplicationState(self.device) |
200 self.tool.CleanUpEnvironment() | 201 self.tool.CleanUpEnvironment() |
201 super(TestRunner, self).TearDown() | 202 super(TestRunner, self).TearDown() |
OLD | NEW |