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