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

Side by Side Diff: build/android/run_instrumentation_tests.py

Issue 10917283: Upstream changes to python tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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 unified diff | Download patch
« no previous file with comments | « build/android/pylib/test_options_parser.py ('k') | build/android/run_monkey_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Runs both the Python and Java tests.""" 7 """Runs both the Python and Java tests."""
8 8
9 import optparse
9 import sys 10 import sys
10 import time 11 import time
11 12
12 from pylib import apk_info 13 from pylib import apk_info
13 from pylib import buildbot_report 14 from pylib import buildbot_report
14 from pylib import test_options_parser 15 from pylib import test_options_parser
15 from pylib import run_java_tests 16 from pylib import run_java_tests
16 from pylib import run_python_tests 17 from pylib import run_python_tests
17 from pylib import run_tests_helper 18 from pylib import run_tests_helper
18 from pylib.test_result import TestResults 19 from pylib.test_result import TestResults
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 [apk_info.ApkInfo(options.test_apk_path, options.test_apk_jar_path)]) 63 [apk_info.ApkInfo(options.test_apk_path, options.test_apk_jar_path)])
63 if options.run_python_tests: 64 if options.run_python_tests:
64 python_results = run_python_tests.DispatchPythonTests(options) 65 python_results = run_python_tests.DispatchPythonTests(options)
65 66
66 all_results, summary_string, num_failing = SummarizeResults( 67 all_results, summary_string, num_failing = SummarizeResults(
67 java_results, python_results, options.annotation, options.build_type) 68 java_results, python_results, options.annotation, options.build_type)
68 return num_failing 69 return num_failing
69 70
70 71
71 def main(argv): 72 def main(argv):
72 options = test_options_parser.ParseInstrumentationArgs(argv) 73 option_parser = optparse.OptionParser()
74 test_options_parser.AddInstrumentationOptions(option_parser)
75 options, args = option_parser.parse_args(argv)
76 test_options_parser.ValidateInstrumentationOptions(options, args)
77
73 run_tests_helper.SetLogLevel(options.verbose_count) 78 run_tests_helper.SetLogLevel(options.verbose_count)
74 buildbot_report.PrintNamedStep('Instrumentation tests: %s' 79 buildbot_report.PrintNamedStep('Instrumentation tests: %s'
75 % ', '.join(options.annotation)) 80 % ', '.join(options.annotation))
76 return DispatchInstrumentationTests(options) 81 return DispatchInstrumentationTests(options)
77 82
78 83
79 if __name__ == '__main__': 84 if __name__ == '__main__':
80 sys.exit(main(sys.argv)) 85 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/pylib/test_options_parser.py ('k') | build/android/run_monkey_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698