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 | 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 |
(...skipping 19 matching lines...) Expand all Loading... | |
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 | 38 self.test_suite_full = test_suite |
39 self.test_suite = os.path.splitext(test_suite)[0] | 39 self.test_suite = os.path.splitext(test_suite)[0] |
40 self.test_suite_basename = os.path.basename(self.test_suite) | 40 self.test_suite_basename = self._GetTestSuiteBaseName() |
John Grabowski
2012/05/17 17:20:06
@property
def test_suite_basename(self):
return
nilesh
2012/05/17 18:43:24
I am new to python, so my understanding may be wro
| |
41 self.test_suite_dirname = os.path.dirname(self.test_suite) | 41 self.test_suite_dirname = os.path.dirname(self.test_suite) |
42 self.rebaseline = rebaseline | 42 self.rebaseline = rebaseline |
43 self.performance_test = performance_test | 43 self.performance_test = performance_test |
44 self.cleanup_test_files = cleanup_test_files | 44 self.cleanup_test_files = cleanup_test_files |
45 self.tool = CreateTool(tool, self.adb) | 45 self.tool = CreateTool(tool, self.adb) |
46 if timeout == 0: | 46 if timeout == 0: |
47 if self.test_suite_basename == 'page_cycler_tests': | 47 if self.test_suite_basename == 'page_cycler_tests': |
48 timeout = 900 | 48 timeout = 900 |
49 else: | 49 else: |
50 timeout = 60 | 50 timeout = 60 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 if ret_code: | 184 if ret_code: |
185 failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code, | 185 failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code, |
186 'pexpect.before: %s' | 186 'pexpect.before: %s' |
187 '\npexpect.after: %s' | 187 '\npexpect.after: %s' |
188 % (p.before, | 188 % (p.before, |
189 p.after))] | 189 p.after))] |
190 # Create TestResults and return | 190 # Create TestResults and return |
191 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, | 191 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, |
192 crashed=crashed_tests, timed_out=timed_out, | 192 crashed=crashed_tests, timed_out=timed_out, |
193 overall_fail=overall_fail) | 193 overall_fail=overall_fail) |
OLD | NEW |