Chromium Code Reviews| Index: build/android/pylib/host_driven/run_python_tests.py |
| diff --git a/build/android/pylib/host_driven/run_python_tests.py b/build/android/pylib/host_driven/run_python_tests.py |
| index bde75d242bed3748f80a4658f3b4e321da79f947..be4c0bf80db43dbfb204308e56c94a1701715059 100644 |
| --- a/build/android/pylib/host_driven/run_python_tests.py |
| +++ b/build/android/pylib/host_driven/run_python_tests.py |
| @@ -14,6 +14,7 @@ from pylib import constants |
| from pylib.base import base_test_result |
| from pylib.instrumentation import test_package |
| from pylib.instrumentation import test_runner |
| +from pylib.utils import report_results |
| import python_test_base |
| from python_test_caller import CallPythonTest |
| @@ -61,8 +62,8 @@ def DispatchPythonTests(options): |
| attached_devices = android_commands.GetAttachedDevices() |
| if not attached_devices: |
| raise Exception('You have no devices attached or visible!') |
| - if options.device: |
| - attached_devices = [options.device] |
| + if options.test_device: |
| + attached_devices = [options.test_device] |
| test_collection = TestInfoCollection() |
| all_tests = _GetAllTests(options.python_test_root, options.official_build) |
| @@ -101,6 +102,20 @@ def DispatchPythonTests(options): |
| return test_results |
| +def Dispatch(options): |
| + """Wraps DispatchPythonTests to log and return the number of failed tests.""" |
| + |
| + results = DispatchPythonTests(options) |
| + report_results.LogFull( |
| + results=results, |
| + test_type='HostDriven', |
| + test_package=os.path.basename(options.test_apk), |
| + annotation=options.annotations, |
| + build_type=options.build_type, |
| + flakiness_server=options.flakiness_dashboard_server) |
|
frankf
2013/06/13 23:17:48
Verify this works
gkanwar
2013/06/17 21:04:43
Done.
|
| + return len(results.GetNotPass()) |
| + |
| + |
| def _GetTestModules(python_test_root, is_official_build): |
| """Retrieve a sorted list of pythonDrivenTests. |