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 | 9 |
10 from pylib import constants | 10 from pylib import constants |
11 from pylib import pexpect | 11 from pylib import pexpect |
12 from pylib.android_commands import errors | 12 from pylib.android_commands import errors |
| 13 from pylib.base.test_result import BaseTestResult, TestResults |
13 from pylib.perf_tests_helper import PrintPerfResult | 14 from pylib.perf_tests_helper import PrintPerfResult |
14 from pylib.test_result import BaseTestResult, TestResults | |
15 | 15 |
16 | 16 |
17 class TestPackage(object): | 17 class TestPackage(object): |
18 """A helper base class for both APK and stand-alone executables. | 18 """A helper base class for both APK and stand-alone executables. |
19 | 19 |
20 Args: | 20 Args: |
21 adb: ADB interface the tests are using. | 21 adb: ADB interface the tests are using. |
22 device: Device to run the tests. | 22 device: Device to run the tests. |
23 test_suite: A specific test suite to run, empty to run all. | 23 test_suite: A specific test suite to run, empty to run all. |
24 timeout: Timeout for each test. | 24 timeout: Timeout for each test. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 if ret_code: | 174 if ret_code: |
175 logging.critical( | 175 logging.critical( |
176 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', | 176 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', |
177 ret_code, p.before, p.after) | 177 ret_code, p.before, p.after) |
178 overall_fail = True | 178 overall_fail = True |
179 | 179 |
180 # Create TestResults and return | 180 # Create TestResults and return |
181 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, | 181 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, |
182 crashed=crashed_tests, timed_out=timed_out, | 182 crashed=crashed_tests, timed_out=timed_out, |
183 overall_fail=overall_fail) | 183 overall_fail=overall_fail) |
OLD | NEW |