Chromium Code Reviews| Index: build/android/run_uiautomator_tests.py |
| diff --git a/build/android/run_uiautomator_tests.py b/build/android/run_uiautomator_tests.py |
| index ad6035b33a18bcbc8e0abf619e860d35d2610e04..384ce3053e68c7e29e38d1ea5127360bdae6399f 100755 |
| --- a/build/android/run_uiautomator_tests.py |
| +++ b/build/android/run_uiautomator_tests.py |
| @@ -6,74 +6,15 @@ |
| """Runs both the Python and Java UIAutomator tests.""" |
| -import optparse |
| +import logging |
| import os |
| +import subprocess |
| import sys |
| -import time |
| - |
| -from pylib import buildbot_report |
| -from pylib import constants |
| -from pylib import ports |
| -from pylib.base import base_test_result |
| -from pylib.host_driven import run_python_tests |
| -from pylib.uiautomator import dispatch |
| -from pylib.utils import report_results |
| -from pylib.utils import run_tests_helper |
| -from pylib.utils import test_options_parser |
| - |
| - |
| -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 |
| - the Java tests run. If the python_only option is set, only the python tests |
| - run. If neither are set, run both Java and Python tests. |
| - |
| - Args: |
| - options: command-line options for running the Java and Python tests. |
| - |
| - Returns: |
| - 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 |
| - # to dispatch any tests. |
| - if not ports.ResetTestServerPortAllocation(): |
| - raise Exception('Failed to reset test server port.') |
| - |
| - all_results = base_test_result.TestRunResults() |
| - |
| - if options.run_java_tests: |
| - all_results.AddTestRunResults(dispatch.Dispatch(options)) |
| - if options.run_python_tests: |
| - all_results.AddTestRunResults(run_python_tests.DispatchPythonTests(options)) |
| - |
| - report_results.LogFull( |
| - results=all_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(all_results.GetNotPass()) |
| - |
| - |
| -def main(argv): |
| - option_parser = optparse.OptionParser() |
| - test_options_parser.AddUIAutomatorOptions(option_parser) |
| - options, args = option_parser.parse_args(argv) |
| - test_options_parser.ValidateUIAutomatorOptions(option_parser, options, args) |
| - |
| - run_tests_helper.SetLogLevel(options.verbose_count) |
| - ret = 1 |
| - try: |
| - ret = DispatchUIAutomatorTests(options) |
| - finally: |
| - buildbot_report.PrintStepResultIfNeeded(options, ret) |
| - return ret |
| - |
| if __name__ == '__main__': |
| - sys.exit(main(sys.argv)) |
| + args = ["python", |
| + os.path.expandvars("$CHROME_SRC/build/android/run_all_tests.py"), |
| + "--uiautomatortests"] + sys.argv[1:] |
| + logging.warning("This script is deprecated. " |
| + "The preferred command is: %s" % (' '.join(args))) |
| + sys.exit(subprocess.call(args)) |
|
craigdh
2013/06/12 18:37:03
ditto
gkanwar
2013/06/13 00:12:34
Done.
|