Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: build/android/pylib/uiautomator/dispatch.py

Issue 15942016: Creates a new test running script test_runner.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/uiautomator/dispatch.py
diff --git a/build/android/pylib/uiautomator/dispatch.py b/build/android/pylib/uiautomator/dispatch.py
index 0f68ce4965246c63302a24ab100311fb5a3cc47b..afe7190b8a0ed81371cca8f4d93003d8154a28a2 100644
--- a/build/android/pylib/uiautomator/dispatch.py
+++ b/build/android/pylib/uiautomator/dispatch.py
@@ -10,12 +10,13 @@ import os
from pylib import android_commands
from pylib.base import base_test_result
from pylib.base import shard
+from pylib.utils import report_results
import test_package
import test_runner
-def Dispatch(options):
+def DispatchCore(options):
"""Dispatches uiautomator tests onto connected device(s).
If possible, this method will attempt to shard the tests to
@@ -42,9 +43,9 @@ def Dispatch(options):
if not attached_devices:
raise Exception('There are no devices online.')
- if options.device:
- assert options.device in attached_devices
- attached_devices = [options.device]
+ if options.test_device:
+ assert options.test_device in attached_devices
+ attached_devices = [options.test_device]
def TestRunnerFactory(device, shard_index):
return test_runner.TestRunner(
@@ -52,3 +53,16 @@ def Dispatch(options):
return shard.ShardAndRunTests(TestRunnerFactory, attached_devices, tests,
options.build_type)
+
+
+def Dispatch(options):
frankf 2013/06/11 02:50:15 So currently the concept of dispatch is pretty ill
+ """Wraps DispatchCore to return number of failures, and log appropriately."""
+ results = DispatchCore(options)
+ report_results.LogFull(
+ results=results,
+ test_type='UIAutomator',
+ test_package=os.path.basename(options.test_jar),
+ annotation=options.annotations,
+ build_type=options.build_type,
+ flakiness_server=options.flakiness_dashboard_server)
+ return len(results.GetNotPass())

Powered by Google App Engine
This is Rietveld 408576698