Index: build/android/run_instrumentation_tests.py |
diff --git a/build/android/run_instrumentation_tests.py b/build/android/run_instrumentation_tests.py |
index 23e613c6026ef0337eb4f8cc62fea35f8b1cdd20..f484dac9d5759b67fc15b18f7f529f818b759f5a 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): |