| OLD | NEW | 
|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 | 5 | 
| 6 import logging | 6 import logging | 
| 7 import re | 7 import re | 
| 8 import os | 8 import os | 
| 9 import pexpect | 9 import pexpect | 
| 10 | 10 | 
| 11 from perf_tests_helper import PrintPerfResult | 11 from perf_tests_helper import PrintPerfResult | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
| 28     performance_test: Whether or not performance test(s). | 28     performance_test: Whether or not performance test(s). | 
| 29     cleanup_test_files: Whether or not to cleanup test files on device. | 29     cleanup_test_files: Whether or not to cleanup test files on device. | 
| 30     tool: Name of the Valgrind tool. | 30     tool: Name of the Valgrind tool. | 
| 31     dump_debug_info: A debug_info object. | 31     dump_debug_info: A debug_info object. | 
| 32   """ | 32   """ | 
| 33 | 33 | 
| 34   def __init__(self, adb, device, test_suite, timeout, rebaseline, | 34   def __init__(self, adb, device, test_suite, timeout, rebaseline, | 
| 35                performance_test, cleanup_test_files, tool, dump_debug_info): | 35                performance_test, cleanup_test_files, tool, dump_debug_info): | 
| 36     self.adb = adb | 36     self.adb = adb | 
| 37     self.device = device | 37     self.device = device | 
| 38     self.test_suite_full = test_suite |  | 
| 39     self.test_suite = os.path.splitext(test_suite)[0] | 38     self.test_suite = os.path.splitext(test_suite)[0] | 
| 40     self.test_suite_basename = os.path.basename(self.test_suite) | 39     self.test_suite_basename = os.path.basename(self.test_suite) | 
| 41     self.test_suite_dirname = os.path.dirname(self.test_suite) | 40     self.test_suite_dirname = os.path.dirname(self.test_suite) | 
| 42     self.rebaseline = rebaseline | 41     self.rebaseline = rebaseline | 
| 43     self.performance_test = performance_test | 42     self.performance_test = performance_test | 
| 44     self.cleanup_test_files = cleanup_test_files | 43     self.cleanup_test_files = cleanup_test_files | 
| 45     self.tool = CreateTool(tool, self.adb) | 44     self.tool = CreateTool(tool, self.adb) | 
| 46     if timeout == 0: | 45     if timeout == 0: | 
| 47       if self.test_suite_basename == 'page_cycler_tests': | 46       if self.test_suite_basename == 'page_cycler_tests': | 
| 48         timeout = 900 | 47         timeout = 900 | 
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 160     if not self.rebaseline and ready_to_continue: | 159     if not self.rebaseline and ready_to_continue: | 
| 161       ok_tests += self._EndGetIOStats(io_stats_before) | 160       ok_tests += self._EndGetIOStats(io_stats_before) | 
| 162       ret_code = self._GetGTestReturnCode() | 161       ret_code = self._GetGTestReturnCode() | 
| 163       if ret_code: | 162       if ret_code: | 
| 164         failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code, | 163         failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code, | 
| 165                                         'pexpect.before: %s' | 164                                         'pexpect.before: %s' | 
| 166                                         '\npexpect.after: %s' | 165                                         '\npexpect.after: %s' | 
| 167                                         % (p.before, | 166                                         % (p.before, | 
| 168                                            p.after))] | 167                                            p.after))] | 
| 169     return TestResults.FromOkAndFailed(ok_tests, failed_tests, timed_out) | 168     return TestResults.FromOkAndFailed(ok_tests, failed_tests, timed_out) | 
| OLD | NEW | 
|---|