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 |