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

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

Issue 11262034: Upstream remaining differences in android/build python files (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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
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 optparse
10 import os 10 import os
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 summary of the Java and Python tests. If the java_only option is set, only 50 summary of the Java and Python tests. If the java_only option is set, only
51 the Java tests run. If the python_only option is set, only the python tests 51 the Java tests run. If the python_only option is set, only the python tests
52 run. If neither are set, run both Java and Python tests. 52 run. If neither are set, run both Java and Python tests.
53 53
54 Args: 54 Args:
55 options: command-line options for running the Java and Python tests. 55 options: command-line options for running the Java and Python tests.
56 56
57 Returns: 57 Returns:
58 An integer representing the number of failing tests. 58 An integer representing the number of failing tests.
59 """ 59 """
60 # Reset the test port allocation. It's important to do it before starting 60 if not options.keep_test_server_ports:
61 # to dispatch any tests. 61 # Reset the test port allocation. It's important to do it before starting
62 if not ports.ResetTestServerPortAllocation(): 62 # to dispatch any tests.
63 raise Exception('Failed to reset test server port.') 63 if not ports.ResetTestServerPortAllocation():
64 raise Exception('Failed to reset test server port.')
65
64 start_date = int(time.time() * 1000) 66 start_date = int(time.time() * 1000)
65 java_results = TestResults() 67 java_results = TestResults()
66 python_results = TestResults() 68 python_results = TestResults()
67 69
68 if options.run_java_tests: 70 if options.run_java_tests:
69 java_results = run_java_tests.DispatchJavaTests( 71 java_results = run_java_tests.DispatchJavaTests(
70 options, 72 options,
71 [apk_info.ApkInfo(options.test_apk_path, options.test_apk_jar_path)]) 73 [apk_info.ApkInfo(options.test_apk_path, options.test_apk_jar_path)])
72 if options.run_python_tests: 74 if options.run_python_tests:
73 python_results = run_python_tests.DispatchPythonTests(options) 75 python_results = run_python_tests.DispatchPythonTests(options)
(...skipping 20 matching lines...) Expand all
94 buildbot_report.PrintNamedStep( 96 buildbot_report.PrintNamedStep(
95 'Instrumentation tests: %s - %s' % (', '.join(options.annotation), 97 'Instrumentation tests: %s - %s' % (', '.join(options.annotation),
96 options.test_apk)) 98 options.test_apk))
97 ret = DispatchInstrumentationTests(options) 99 ret = DispatchInstrumentationTests(options)
98 buildbot_report.PrintStepResultIfNeeded(options, ret) 100 buildbot_report.PrintStepResultIfNeeded(options, ret)
99 return ret 101 return ret
100 102
101 103
102 if __name__ == '__main__': 104 if __name__ == '__main__':
103 sys.exit(main(sys.argv)) 105 sys.exit(main(sys.argv))
OLDNEW
« build/android/pylib/single_test_runner.py ('K') | « build/android/pylib/test_options_parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698