diff options
author | frankf@chromium.org <frankf@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 00:29:12 +0000 |
---|---|---|
committer | frankf@chromium.org <frankf@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-26 00:29:12 +0000 |
commit | d20b585f162ff19ce63cf1b0b64aa92659ddedfd (patch) | |
tree | ffe2b182a043653ec8bf772c7e61ee40c8353668 /build/android/run_instrumentation_tests.py | |
parent | 3c9ea0f2fd5bfc03db84e42803b50b5516aac2c9 (diff) | |
download | chromium_src-d20b585f162ff19ce63cf1b0b64aa92659ddedfd.zip chromium_src-d20b585f162ff19ce63cf1b0b64aa92659ddedfd.tar.gz chromium_src-d20b585f162ff19ce63cf1b0b64aa92659ddedfd.tar.bz2 |
[Android] Rewrite base test result classes.
- Use set instead of list
- Encapsulate internals
- Add unit tests
- Separate out the reporting utilities
BUG=167331
NOTRY=True
Review URL: https://codereview.chromium.org/12544033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190525 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/run_instrumentation_tests.py')
-rwxr-xr-x | build/android/run_instrumentation_tests.py | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/build/android/run_instrumentation_tests.py b/build/android/run_instrumentation_tests.py index 4522ce8e..4b288f1 100755 --- a/build/android/run_instrumentation_tests.py +++ b/build/android/run_instrumentation_tests.py @@ -7,16 +7,14 @@ """Runs both the Python and Java instrumentation tests.""" import optparse -import os import sys -import time from pylib import buildbot_report -from pylib import constants from pylib import ports -from pylib.base import test_result +from pylib.base import base_test_result from pylib.host_driven import run_python_tests from pylib.instrumentation import dispatch +from pylib.utils import report_results from pylib.utils import run_tests_helper from pylib.utils import test_options_parser @@ -41,26 +39,22 @@ def DispatchInstrumentationTests(options): if not ports.ResetTestServerPortAllocation(): raise Exception('Failed to reset test server port.') - java_results = test_result.TestResults() - python_results = test_result.TestResults() + all_results = base_test_result.TestRunResults() if options.run_java_tests: - java_results = dispatch.Dispatch(options) - + all_results.AddTestRunResults(dispatch.Dispatch(options)) if options.run_python_tests: - python_results = run_python_tests.DispatchPythonTests(options) - - all_results = test_result.TestResults.FromTestResults([java_results, - python_results]) + all_results.AddTestRunResults(run_python_tests.DispatchPythonTests(options)) - all_results.LogFull( + report_results.LogFull( + results=all_results, test_type='Instrumentation', test_package=options.test_apk, annotation=options.annotation, build_type=options.build_type, flakiness_server=options.flakiness_dashboard_server) - return len(all_results.GetAllBroken()) + return len(all_results.GetNotPass()) def main(argv): |