diff options
author | frankf@google.com <frankf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-18 22:01:09 +0000 |
---|---|---|
committer | frankf@google.com <frankf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-18 22:01:09 +0000 |
commit | 161dbcfac6c6548e2dbfe075834c540813b93929 (patch) | |
tree | 04ff845616f54f34c6fa769814a2c1d91fde59db /build/android/run_instrumentation_tests.py | |
parent | 0b0e31468adbbd409d8c931c87997eeb138f2211 (diff) | |
download | chromium_src-161dbcfac6c6548e2dbfe075834c540813b93929.zip chromium_src-161dbcfac6c6548e2dbfe075834c540813b93929.tar.gz chromium_src-161dbcfac6c6548e2dbfe075834c540813b93929.tar.bz2 |
Refactor android test results logging.
BUG=165529
Review URL: https://codereview.chromium.org/11616010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/run_instrumentation_tests.py')
-rwxr-xr-x | build/android/run_instrumentation_tests.py | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/build/android/run_instrumentation_tests.py b/build/android/run_instrumentation_tests.py index 23e613c..f484dac 100755 --- a/build/android/run_instrumentation_tests.py +++ b/build/android/run_instrumentation_tests.py @@ -14,7 +14,6 @@ import time from pylib import apk_info from pylib import buildbot_report from pylib import constants -from pylib import flakiness_dashboard_results_uploader from pylib import ports from pylib import run_java_tests from pylib import run_python_tests @@ -23,26 +22,6 @@ from pylib import test_options_parser from pylib.test_result import TestResults -def SummarizeResults(java_results, python_results, annotation, build_type): - """Summarize the results from the various test types. - - Args: - java_results: a TestResults object with java test case results. - python_results: a TestResults object with python test case results. - annotation: the annotation used for these results. - build_type: 'Release' or 'Debug'. - - Returns: - A tuple (all_results, summary_string, num_failing) - """ - all_results = TestResults.FromTestResults([java_results, python_results]) - summary_string = all_results.LogFull('Instrumentation', annotation, - build_type, []) - num_failing = (len(all_results.failed) + len(all_results.crashed) + - len(all_results.unknown)) - return all_results, summary_string, num_failing - - def DispatchInstrumentationTests(options): """Dispatches the Java and Python instrumentation tests, sharding if possible. @@ -55,7 +34,7 @@ def DispatchInstrumentationTests(options): options: command-line options for running the Java and Python tests. Returns: - An integer representing the number of failing tests. + An integer representing the number of broken tests. """ if not options.keep_test_server_ports: # Reset the test port allocation. It's important to do it before starting @@ -74,15 +53,16 @@ def DispatchInstrumentationTests(options): if options.run_python_tests: python_results = run_python_tests.DispatchPythonTests(options) - all_results, summary_string, num_failing = SummarizeResults( - java_results, python_results, options.annotation, options.build_type) + all_results = TestResults.FromTestResults([java_results, python_results]) - if options.flakiness_dashboard_server: - flakiness_dashboard_results_uploader.Upload( - options.flakiness_dashboard_server, 'Chromium_Android_Instrumentation', - TestResults.FromTestResults([java_results, python_results])) + all_results.LogFull( + test_type='Instrumentation', + test_package=options.test_apk, + annotation=options.annotation, + build_type=options.build_type, + flakiness_server=options.flakiness_dashboard_server) - return num_failing + return len(all_results.GetAllBroken()) def main(argv): |