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

Unified Diff: build/android/run_uiautomator_tests.py

Issue 12921004: [Android] Enable running uiautomator tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « build/android/run_instrumentation_tests.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/run_uiautomator_tests.py
diff --git a/build/android/run_instrumentation_tests.py b/build/android/run_uiautomator_tests.py
similarity index 72%
copy from build/android/run_instrumentation_tests.py
copy to build/android/run_uiautomator_tests.py
index 12a15105075621a0fd28372a15b48d76f57043bd..58c82445777bc691127043fee13874aa13cd79ed 100755
--- a/build/android/run_instrumentation_tests.py
+++ b/build/android/run_uiautomator_tests.py
@@ -1,10 +1,10 @@
#!/usr/bin/env python
#
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""Runs both the Python and Java tests."""
+"""Runs both the Python and Java UIAutomator tests."""
import optparse
import os
@@ -16,14 +16,13 @@ from pylib import constants
from pylib import ports
from pylib.base import test_result
from pylib.host_driven import run_python_tests
-from pylib.instrumentation import apk_info
from pylib.instrumentation import dispatch
from pylib.utils import run_tests_helper
from pylib.utils import test_options_parser
-def DispatchInstrumentationTests(options):
- """Dispatches the Java and Python instrumentation tests, sharding if possible.
+def DispatchUIAutomatorTests(options):
+ """Dispatches the UIAutomator tests, sharding if possible.
Uses the logging module to print the combined final results and
summary of the Java and Python tests. If the java_only option is set, only
@@ -42,14 +41,12 @@ def DispatchInstrumentationTests(options):
if not ports.ResetTestServerPortAllocation():
raise Exception('Failed to reset test server port.')
- start_date = int(time.time() * 1000)
java_results = test_result.TestResults()
python_results = test_result.TestResults()
if options.run_java_tests:
- java_results = dispatch.Dispatch(
- options,
- [apk_info.ApkInfo(options.test_apk_path, options.test_apk_jar_path)])
+ java_results = dispatch.Dispatch(options)
+
if options.run_python_tests:
python_results = run_python_tests.DispatchPythonTests(options)
@@ -57,8 +54,8 @@ def DispatchInstrumentationTests(options):
python_results])
all_results.LogFull(
- test_type='Instrumentation',
- test_package=options.test_apk,
+ test_type='UIAutomator',
+ test_package=os.path.basename(options.uiautomator_jar),
annotation=options.annotation,
build_type=options.build_type,
flakiness_server=options.flakiness_dashboard_server)
@@ -68,15 +65,14 @@ def DispatchInstrumentationTests(options):
def main(argv):
option_parser = optparse.OptionParser()
- test_options_parser.AddInstrumentationOptions(option_parser)
+ test_options_parser.AddUIAutomatorOptions(option_parser)
options, args = option_parser.parse_args(argv)
- test_options_parser.ValidateInstrumentationOptions(option_parser, options,
- args)
+ test_options_parser.ValidateUIAutomatorOptions(option_parser, options, args)
run_tests_helper.SetLogLevel(options.verbose_count)
ret = 1
try:
- ret = DispatchInstrumentationTests(options)
+ ret = DispatchUIAutomatorTests(options)
finally:
buildbot_report.PrintStepResultIfNeeded(options, ret)
return ret
« no previous file with comments | « build/android/run_instrumentation_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698