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 glob | 5 import glob |
6 import logging | 6 import logging |
7 import os | 7 import os |
8 import sys | 8 import sys |
9 | 9 |
10 from base_test_runner import BaseTestRunner | 10 from base_test_runner import BaseTestRunner |
(...skipping 17 matching lines...) Expand all Loading... |
28 rebaseline: Whether or not to run tests in isolation and update the filter. | 28 rebaseline: Whether or not to run tests in isolation and update the filter. |
29 performance_test: Whether or not performance test(s). | 29 performance_test: Whether or not performance test(s). |
30 cleanup_test_files: Whether or not to cleanup test files on device. | 30 cleanup_test_files: Whether or not to cleanup test files on device. |
31 tool: Name of the Valgrind tool. | 31 tool: Name of the Valgrind tool. |
32 shard_index: index number of the shard on which the test suite will run. | 32 shard_index: index number of the shard on which the test suite will run. |
33 dump_debug_info: Whether or not to dump debug information. | 33 dump_debug_info: Whether or not to dump debug information. |
34 """ | 34 """ |
35 | 35 |
36 def __init__(self, device, test_suite, gtest_filter, test_arguments, timeout, | 36 def __init__(self, device, test_suite, gtest_filter, test_arguments, timeout, |
37 rebaseline, performance_test, cleanup_test_files, tool_name, | 37 rebaseline, performance_test, cleanup_test_files, tool_name, |
38 shard_index, dump_debug_info=False, | 38 shard_index, dump_debug_info, fast_and_loose): |
39 fast_and_loose=False): | |
40 BaseTestRunner.__init__(self, device, tool_name, shard_index) | 39 BaseTestRunner.__init__(self, device, tool_name, shard_index) |
41 self._running_on_emulator = self.device.startswith('emulator') | 40 self._running_on_emulator = self.device.startswith('emulator') |
42 self._gtest_filter = gtest_filter | 41 self._gtest_filter = gtest_filter |
43 self._test_arguments = test_arguments | 42 self._test_arguments = test_arguments |
44 self.test_results = TestResults() | 43 self.test_results = TestResults() |
45 if dump_debug_info: | 44 if dump_debug_info: |
46 self.dump_debug_info = debug_info.GTestDebugInfo(self.adb, device, | 45 self.dump_debug_info = debug_info.GTestDebugInfo(self.adb, device, |
47 os.path.basename(test_suite), gtest_filter) | 46 os.path.basename(test_suite), gtest_filter) |
48 else: | 47 else: |
49 self.dump_debug_info = None | 48 self.dump_debug_info = None |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 def TearDown(self): | 324 def TearDown(self): |
326 """Cleans up the test enviroment for the test suite.""" | 325 """Cleans up the test enviroment for the test suite.""" |
327 self.tool.CleanUpEnvironment() | 326 self.tool.CleanUpEnvironment() |
328 if self.test_package.cleanup_test_files: | 327 if self.test_package.cleanup_test_files: |
329 self.adb.RemovePushedFiles() | 328 self.adb.RemovePushedFiles() |
330 if self.dump_debug_info: | 329 if self.dump_debug_info: |
331 self.dump_debug_info.StopRecordingLog() | 330 self.dump_debug_info.StopRecordingLog() |
332 if self.test_package.performance_test: | 331 if self.test_package.performance_test: |
333 self.adb.TearDownPerformanceTest() | 332 self.adb.TearDownPerformanceTest() |
334 super(SingleTestRunner, self).TearDown() | 333 super(SingleTestRunner, self).TearDown() |
OLD | NEW |