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

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

Issue 10690081: auto-detect directory when running tests with specified test_suite (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to latest origin/master Created 8 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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 all the native unit tests. 7 """Runs all the native unit tests.
8 8
9 1. Copy over test binary to /data/local on device. 9 1. Copy over test binary to /data/local on device.
10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) 10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak)
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 annotate: should we print buildbot-style annotations? 190 annotate: should we print buildbot-style annotations?
191 191
192 Returns: 192 Returns:
193 A TestResults object. 193 A TestResults object.
194 """ 194 """
195 results = [] 195 results = []
196 global _TEST_SUITES 196 global _TEST_SUITES
197 197
198 if test_suite: 198 if test_suite:
199 global _TEST_SUITES 199 global _TEST_SUITES
200
201 # If not specified, assume the test suites are in out/Release
202 test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR,
203 'out', 'Release'))
204 if apk:
205 # out/Release/$SUITE_apk/$SUITE-debug.apk
206 test_suite = os.path.join(test_suite_dir,
207 test_suite + '_apk',
208 test_suite + '-debug.apk')
209 else:
210 test_suite = os.path.join(test_suite_dir, test_suite)
211
200 if (not os.path.exists(test_suite)): 212 if (not os.path.exists(test_suite)):
201 logging.critical('Unrecognized test suite %s, supported: %s' % 213 logging.critical('Unrecognized test suite %s, supported: %s' %
202 (test_suite, _TEST_SUITES)) 214 (test_suite, _TEST_SUITES))
203 if test_suite in _TEST_SUITES: 215 if test_suite in _TEST_SUITES:
204 logging.critical('(Remember to include the path: out/Release/%s)', 216 logging.critical('(Remember to include the path: out/Release/%s)',
205 test_suite) 217 test_suite)
206 test_suite_basename = os.path.basename(test_suite) 218 test_suite_basename = os.path.basename(test_suite)
207 if test_suite_basename in _TEST_SUITES: 219 if test_suite_basename in _TEST_SUITES:
208 logging.critical('Try "make -j15 %s"' % test_suite_basename) 220 logging.critical('Try "make -j15 %s"' % test_suite_basename)
209 else: 221 else:
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 # from all suites, but the buildbot associates the exit status only with the 498 # from all suites, but the buildbot associates the exit status only with the
487 # most recent step). 499 # most recent step).
488 if options.annotate: 500 if options.annotate:
489 return 0 501 return 0
490 else: 502 else:
491 return failed_tests_count 503 return failed_tests_count
492 504
493 505
494 if __name__ == '__main__': 506 if __name__ == '__main__':
495 sys.exit(main(sys.argv)) 507 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698