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 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class TestRunner(base_test_runner.BaseTestRunner): | 42 class TestRunner(base_test_runner.BaseTestRunner): |
43 def __init__(self, test_options, device, test_package): | 43 def __init__(self, test_options, device, test_package): |
44 """Single test suite attached to a single device. | 44 """Single test suite attached to a single device. |
45 | 45 |
46 Args: | 46 Args: |
47 test_options: A GTestOptions object. | 47 test_options: A GTestOptions object. |
48 device: Device to run the tests. | 48 device: Device to run the tests. |
49 test_package: An instance of TestPackage class. | 49 test_package: An instance of TestPackage class. |
50 """ | 50 """ |
51 | 51 |
52 super(TestRunner, self).__init__(device, test_options.tool, | 52 super(TestRunner, self).__init__(device, test_options.tool) |
53 test_options.cleanup_test_files) | |
54 | 53 |
55 self.test_package = test_package | 54 self.test_package = test_package |
56 self.test_package.tool = self.tool | 55 self.test_package.tool = self.tool |
57 self._test_arguments = test_options.test_arguments | 56 self._test_arguments = test_options.test_arguments |
58 | 57 |
59 timeout = test_options.timeout | 58 timeout = test_options.timeout |
60 if timeout == 0: | 59 if timeout == 0: |
61 timeout = 60 | 60 timeout = 60 |
62 # On a VM (e.g. chromium buildbots), this timeout is way too small. | 61 # On a VM (e.g. chromium buildbots), this timeout is way too small. |
63 if os.environ.get('BUILDBOT_SLAVENAME'): | 62 if os.environ.get('BUILDBOT_SLAVENAME'): |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 #override | 186 #override |
188 def TearDown(self): | 187 def TearDown(self): |
189 """Cleans up the test enviroment for the test suite.""" | 188 """Cleans up the test enviroment for the test suite.""" |
190 for s in self._servers: | 189 for s in self._servers: |
191 s.TearDown() | 190 s.TearDown() |
192 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 191 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
193 self._perf_controller.SetDefaultPerfMode() | 192 self._perf_controller.SetDefaultPerfMode() |
194 self.test_package.ClearApplicationState(self.device) | 193 self.test_package.ClearApplicationState(self.device) |
195 self.tool.CleanUpEnvironment() | 194 self.tool.CleanUpEnvironment() |
196 super(TestRunner, self).TearDown() | 195 super(TestRunner, self).TearDown() |
OLD | NEW |