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) |
53 | 54 |
54 self.test_package = test_package | 55 self.test_package = test_package |
55 self.test_package.tool = self.tool | 56 self.test_package.tool = self.tool |
56 self._test_arguments = test_options.test_arguments | 57 self._test_arguments = test_options.test_arguments |
57 | 58 |
58 timeout = test_options.timeout | 59 timeout = test_options.timeout |
59 if timeout == 0: | 60 if timeout == 0: |
60 timeout = 60 | 61 timeout = 60 |
61 # On a VM (e.g. chromium buildbots), this timeout is way too small. | 62 # On a VM (e.g. chromium buildbots), this timeout is way too small. |
62 if os.environ.get('BUILDBOT_SLAVENAME'): | 63 if os.environ.get('BUILDBOT_SLAVENAME'): |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 #override | 187 #override |
187 def TearDown(self): | 188 def TearDown(self): |
188 """Cleans up the test enviroment for the test suite.""" | 189 """Cleans up the test enviroment for the test suite.""" |
189 for s in self._servers: | 190 for s in self._servers: |
190 s.TearDown() | 191 s.TearDown() |
191 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 192 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
192 self._perf_controller.SetDefaultPerfMode() | 193 self._perf_controller.SetDefaultPerfMode() |
193 self.test_package.ClearApplicationState(self.device) | 194 self.test_package.ClearApplicationState(self.device) |
194 self.tool.CleanUpEnvironment() | 195 self.tool.CleanUpEnvironment() |
195 super(TestRunner, self).TearDown() | 196 super(TestRunner, self).TearDown() |
OLD | NEW |