| 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 devil.android.perf import perf_control |
| 12 from pylib import pexpect | 13 from pylib import pexpect |
| 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.local import local_test_server_spawner | 16 from pylib.local import local_test_server_spawner |
| 16 from pylib.perf import perf_control | |
| 17 | 17 |
| 18 # Test case statuses. | 18 # Test case statuses. |
| 19 RE_RUN = re.compile('\\[ RUN \\] ?(.*)\r\n') | 19 RE_RUN = re.compile('\\[ RUN \\] ?(.*)\r\n') |
| 20 RE_FAIL = re.compile('\\[ FAILED \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') | 20 RE_FAIL = re.compile('\\[ FAILED \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') |
| 21 RE_OK = re.compile('\\[ OK \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') | 21 RE_OK = re.compile('\\[ OK \\] ?(.*?)( \\((\\d+) ms\\))?\r\r\n') |
| 22 | 22 |
| 23 # Test run statuses. | 23 # Test run statuses. |
| 24 RE_PASSED = re.compile('\\[ PASSED \\] ?(.*)\r\n') | 24 RE_PASSED = re.compile('\\[ PASSED \\] ?(.*)\r\n') |
| 25 RE_RUNNER_FAIL = re.compile('\\[ RUNNER_FAILED \\] ?(.*)\r\n') | 25 RE_RUNNER_FAIL = re.compile('\\[ RUNNER_FAILED \\] ?(.*)\r\n') |
| 26 # Signal handlers are installed before starting tests | 26 # Signal handlers are installed before starting tests |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 #override | 207 #override |
| 208 def TearDown(self): | 208 def TearDown(self): |
| 209 """Cleans up the test enviroment for the test suite.""" | 209 """Cleans up the test enviroment for the test suite.""" |
| 210 for s in self._servers: | 210 for s in self._servers: |
| 211 s.TearDown() | 211 s.TearDown() |
| 212 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 212 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
| 213 self._perf_controller.SetDefaultPerfMode() | 213 self._perf_controller.SetDefaultPerfMode() |
| 214 self.test_package.ClearApplicationState(self.device) | 214 self.test_package.ClearApplicationState(self.device) |
| 215 self.tool.CleanUpEnvironment() | 215 self.tool.CleanUpEnvironment() |
| 216 super(TestRunner, self).TearDown() | 216 super(TestRunner, self).TearDown() |
| OLD | NEW |