| 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 | |
| 10 | 9 |
| 11 import constants | 10 import constants |
| 12 from perf_tests_helper import PrintPerfResult | 11 from perf_tests_helper import PrintPerfResult |
| 12 from pylib import pexpect |
| 13 from test_result import BaseTestResult, TestResults | 13 from test_result import BaseTestResult, TestResults |
| 14 | 14 |
| 15 | 15 |
| 16 # TODO(bulach): TestPackage, TestPackageExecutable and | 16 # TODO(bulach): TestPackage, TestPackageExecutable and |
| 17 # TestPackageApk are a work in progress related to making the native tests | 17 # TestPackageApk are a work in progress related to making the native tests |
| 18 # run as a NDK-app from an APK rather than a stand-alone executable. | 18 # run as a NDK-app from an APK rather than a stand-alone executable. |
| 19 class TestPackage(object): | 19 class TestPackage(object): |
| 20 """A helper base class for both APK and stand-alone executables. | 20 """A helper base class for both APK and stand-alone executables. |
| 21 | 21 |
| 22 Args: | 22 Args: |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 if ret_code: | 191 if ret_code: |
| 192 failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code, | 192 failed_tests += [BaseTestResult('gtest exit code: %d' % ret_code, |
| 193 'pexpect.before: %s' | 193 'pexpect.before: %s' |
| 194 '\npexpect.after: %s' | 194 '\npexpect.after: %s' |
| 195 % (p.before, | 195 % (p.before, |
| 196 p.after))] | 196 p.after))] |
| 197 # Create TestResults and return | 197 # Create TestResults and return |
| 198 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, | 198 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, |
| 199 crashed=crashed_tests, timed_out=timed_out, | 199 crashed=crashed_tests, timed_out=timed_out, |
| 200 overall_fail=overall_fail) | 200 overall_fail=overall_fail) |
| OLD | NEW |