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

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

Issue 9834037: apk-based test runner work. Not enabled yet. This CL is a combination of upstreaming, ndk/ant-ifi… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: one more line tweak Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Runs all the native unit tests. 6 """Runs all the native unit tests.
7 7
8 1. Copy over test binary to /data/local on device. 8 1. Copy over test binary to /data/local on device.
9 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) 9 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak)
10 to be deployed to the device (in /data/local/tmp). 10 to be deployed to the device (in /data/local/tmp).
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 log_dump_name: Name of log dump file. 160 log_dump_name: Name of log dump file.
161 annotate: should we print buildbot-style annotations? 161 annotate: should we print buildbot-style annotations?
162 162
163 Returns: 163 Returns:
164 A TestResults object. 164 A TestResults object.
165 """ 165 """
166 results = [] 166 results = []
167 167
168 if test_suite: 168 if test_suite:
169 global _TEST_SUITES 169 global _TEST_SUITES
170 if not os.path.exists(test_suite): 170 if (not os.path.exists(test_suite) and
171 not os.path.splitext(test_suite)[1] == '.apk'):
171 logging.critical('Unrecognized test suite %s, supported: %s' % 172 logging.critical('Unrecognized test suite %s, supported: %s' %
172 (test_suite, _TEST_SUITES)) 173 (test_suite, _TEST_SUITES))
173 if test_suite in _TEST_SUITES: 174 if test_suite in _TEST_SUITES:
174 logging.critical('(Remember to include the path: out/Release/%s)', 175 logging.critical('(Remember to include the path: out/Release/%s)',
175 test_suite) 176 test_suite)
176 return TestResults.FromOkAndFailed([], [BaseTestResult(test_suite, '')]) 177 return TestResults.FromOkAndFailed([], [BaseTestResult(test_suite, '')])
177 fully_qualified_test_suites = [test_suite] 178 fully_qualified_test_suites = [test_suite]
178 else: 179 else:
179 fully_qualified_test_suites = FullyQualifiedTestSuites() 180 fully_qualified_test_suites = FullyQualifiedTestSuites()
180 debug_info_list = [] 181 debug_info_list = []
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 if len(args) > 1: 423 if len(args) > 1:
423 print 'Unknown argument:', args[1:] 424 print 'Unknown argument:', args[1:]
424 option_parser.print_usage() 425 option_parser.print_usage()
425 sys.exit(1) 426 sys.exit(1)
426 run_tests_helper.SetLogLevel(options.verbose_count) 427 run_tests_helper.SetLogLevel(options.verbose_count)
427 return Dispatch(options) 428 return Dispatch(options)
428 429
429 430
430 if __name__ == '__main__': 431 if __name__ == '__main__':
431 sys.exit(main(sys.argv)) 432 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698