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

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

Issue 10387086: Run APK tests on the android_test trybot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated SDK on bots. Ready for review. Created 8 years, 7 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 _TEST_SUITES = ['base_unittests', 69 _TEST_SUITES = ['base_unittests',
70 'content_unittests', 70 'content_unittests',
71 'gpu_unittests', 71 'gpu_unittests',
72 'ipc_tests', 72 'ipc_tests',
73 'net_unittests', 73 'net_unittests',
74 'sql_unittests', 74 'sql_unittests',
75 'sync_unit_tests', 75 'sync_unit_tests',
76 'ui_unittests', 76 'ui_unittests',
77 ] 77 ]
78 78
79 # Test suites which are build as an APK. This will be replaced by the default
80 # list when we start building all suites as APK.
81 _APK_TEST_SUITES = ['base_unittests',
82 'ipc_tests',
83 'ui_unittests',
84 ]
79 85
80 def FullyQualifiedTestSuites(apk): 86 def FullyQualifiedTestSuites(apk):
81 """Return a fully qualified list that represents all known suites. 87 """Return a fully qualified list that represents all known suites.
82 88
83 Args: 89 Args:
84 apk: if True, use the apk-based test runner""" 90 apk: if True, use the apk-based test runner"""
85 # If not specified, assume the test suites are in out/Release 91 # If not specified, assume the test suites are in out/Release
86 test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR, 92 test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR,
87 'out', 'Release')) 93 'out', 'Release'))
88 if apk: 94 if apk:
89 # out/Release/$SUITE_apk/ChromeNativeTests-debug.apk 95 # out/Release/$SUITE_apk/$SUITE-debug.apk
90 suites = [os.path.join(test_suite_dir, 96 suites = [os.path.join(test_suite_dir,
91 t + '_apk', 97 t + '_apk',
92 'ChromeNativeTests-debug.apk') 98 t + '-debug.apk')
93 for t in _TEST_SUITES] 99 for t in _APK_TEST_SUITES]
94 else: 100 else:
95 suites = [os.path.join(test_suite_dir, t) for t in _TEST_SUITES] 101 suites = [os.path.join(test_suite_dir, t) for t in _TEST_SUITES]
96 return suites 102 return suites
97 103
98 104
99 class TimeProfile(object): 105 class TimeProfile(object):
100 """Class for simple profiling of action, with logging of cost.""" 106 """Class for simple profiling of action, with logging of cost."""
101 107
102 def __init__(self, description): 108 def __init__(self, description):
103 self._description = description 109 self._description = description
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 # from all suites, but the buildbot associates the exit status only with the 465 # from all suites, but the buildbot associates the exit status only with the
460 # most recent step). 466 # most recent step).
461 if options.annotate: 467 if options.annotate:
462 return 0 468 return 0
463 else: 469 else:
464 return failed_tests_count 470 return failed_tests_count
465 471
466 472
467 if __name__ == '__main__': 473 if __name__ == '__main__':
468 sys.exit(main(sys.argv)) 474 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698