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 sys | 7 import sys |
8 | 8 |
9 from base_test_runner import BaseTestRunner | 9 from base_test_runner import BaseTestRunner |
10 import debug_info | 10 import debug_info |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 logging.info(self.device) | 264 logging.info(self.device) |
265 logging.info('Executed: ' + str(len(executed_names)) + ' of ' + | 265 logging.info('Executed: ' + str(len(executed_names)) + ' of ' + |
266 str(len(all_tests))) | 266 str(len(all_tests))) |
267 logging.info('Failed so far: ' + str(len(failed_results)) + ' ' + | 267 logging.info('Failed so far: ' + str(len(failed_results)) + ' ' + |
268 str([f.name for f in failed_results])) | 268 str([f.name for f in failed_results])) |
269 logging.info('Remaining: ' + str(len(all_tests - executed_names)) + ' ' + | 269 logging.info('Remaining: ' + str(len(all_tests - executed_names)) + ' ' + |
270 str(all_tests - executed_names)) | 270 str(all_tests - executed_names)) |
271 logging.info('*' * 80) | 271 logging.info('*' * 80) |
272 if executed_names == all_tests: | 272 if executed_names == all_tests: |
273 break | 273 break |
274 self.test_results = TestResults.FromOkAndFailed(list(executed_results - | 274 self.test_results = TestResults.FromRun( |
275 failed_results), | 275 ok=list(executed_results - failed_results), |
276 list(failed_results), | 276 failed=list(failed_results)) |
277 False, False) | |
278 | 277 |
279 def RunTests(self): | 278 def RunTests(self): |
280 """Runs all tests (in rebaseline mode, runs each test in isolation). | 279 """Runs all tests (in rebaseline mode, runs each test in isolation). |
281 | 280 |
282 Returns: | 281 Returns: |
283 A TestResults object. | 282 A TestResults object. |
284 """ | 283 """ |
285 if self.test_package.rebaseline: | 284 if self.test_package.rebaseline: |
286 self.RebaselineTests() | 285 self.RebaselineTests() |
287 else: | 286 else: |
(...skipping 21 matching lines...) Expand all Loading... |
309 def TearDown(self): | 308 def TearDown(self): |
310 """Cleans up the test enviroment for the test suite.""" | 309 """Cleans up the test enviroment for the test suite.""" |
311 self.test_package.tool.CleanUpEnvironment() | 310 self.test_package.tool.CleanUpEnvironment() |
312 if self.test_package.cleanup_test_files: | 311 if self.test_package.cleanup_test_files: |
313 self.adb.RemovePushedFiles() | 312 self.adb.RemovePushedFiles() |
314 if self.dump_debug_info: | 313 if self.dump_debug_info: |
315 self.dump_debug_info.StopRecordingLog() | 314 self.dump_debug_info.StopRecordingLog() |
316 if self.test_package.performance_test: | 315 if self.test_package.performance_test: |
317 self.adb.TearDownPerformanceTest() | 316 self.adb.TearDownPerformanceTest() |
318 super(SingleTestRunner, self).TearDown() | 317 super(SingleTestRunner, self).TearDown() |
OLD | NEW |