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 android_commands | 9 from pylib import android_commands |
10 from pylib import constants | 10 from pylib import constants |
(...skipping 15 matching lines...) Expand all Loading... |
26 def __init__(self, test_options, device, test_package): | 26 def __init__(self, test_options, device, test_package): |
27 """Single test suite attached to a single device. | 27 """Single test suite attached to a single device. |
28 | 28 |
29 Args: | 29 Args: |
30 test_options: A GTestOptions object. | 30 test_options: A GTestOptions object. |
31 device: Device to run the tests. | 31 device: Device to run the tests. |
32 test_package: An instance of TestPackage class. | 32 test_package: An instance of TestPackage class. |
33 """ | 33 """ |
34 | 34 |
35 super(TestRunner, self).__init__(device, test_options.tool, | 35 super(TestRunner, self).__init__(device, test_options.tool, |
36 test_options.build_type, | |
37 test_options.push_deps, | 36 test_options.push_deps, |
38 test_options.cleanup_test_files) | 37 test_options.cleanup_test_files) |
39 | 38 |
40 self.test_package = test_package | 39 self.test_package = test_package |
41 self.test_package.tool = self.tool | 40 self.test_package.tool = self.tool |
42 self._test_arguments = test_options.test_arguments | 41 self._test_arguments = test_options.test_arguments |
43 | 42 |
44 timeout = test_options.timeout | 43 timeout = test_options.timeout |
45 if timeout == 0: | 44 if timeout == 0: |
46 timeout = 60 | 45 timeout = 60 |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 #override | 187 #override |
189 def TearDown(self): | 188 def TearDown(self): |
190 """Cleans up the test enviroment for the test suite.""" | 189 """Cleans up the test enviroment for the test suite.""" |
191 # Content shell creates a profile on the sdscard which accumulates cache | 190 # Content shell creates a profile on the sdscard which accumulates cache |
192 # files over time. | 191 # files over time. |
193 self.adb.RunShellCommand('rm -r ' + | 192 self.adb.RunShellCommand('rm -r ' + |
194 os.path.join(self.adb.GetExternalStorage(), 'content_shell'), | 193 os.path.join(self.adb.GetExternalStorage(), 'content_shell'), |
195 timeout_time=60 * 2) | 194 timeout_time=60 * 2) |
196 self.tool.CleanUpEnvironment() | 195 self.tool.CleanUpEnvironment() |
197 super(TestRunner, self).TearDown() | 196 super(TestRunner, self).TearDown() |
OLD | NEW |