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

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

Issue 10458055: Enable APK based tests for all unittest bundles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « build/all_android.gyp ('k') | 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 # 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 run as 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 'content_unittests',
83 'ipc_tests',
84 'net_unittests',
85 ]
86
87 def FullyQualifiedTestSuites(apk): 79 def FullyQualifiedTestSuites(apk):
88 """Return a fully qualified list that represents all known suites. 80 """Return a fully qualified list that represents all known suites.
89 81
90 Args: 82 Args:
91 apk: if True, use the apk-based test runner""" 83 apk: if True, use the apk-based test runner"""
92 # If not specified, assume the test suites are in out/Release 84 # If not specified, assume the test suites are in out/Release
93 test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR, 85 test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR,
94 'out', 'Release')) 86 'out', 'Release'))
95 if apk: 87 if apk:
96 # out/Release/$SUITE_apk/$SUITE-debug.apk 88 # out/Release/$SUITE_apk/$SUITE-debug.apk
97 suites = [os.path.join(test_suite_dir, 89 suites = [os.path.join(test_suite_dir,
98 t + '_apk', 90 t + '_apk',
99 t + '-debug.apk') 91 t + '-debug.apk')
100 for t in _APK_TEST_SUITES] 92 for t in _TEST_SUITES]
101 else: 93 else:
102 suites = [os.path.join(test_suite_dir, t) for t in _TEST_SUITES] 94 suites = [os.path.join(test_suite_dir, t) for t in _TEST_SUITES]
103 return suites 95 return suites
104 96
105 97
106 class TimeProfile(object): 98 class TimeProfile(object):
107 """Class for simple profiling of action, with logging of cost.""" 99 """Class for simple profiling of action, with logging of cost."""
108 100
109 def __init__(self, description): 101 def __init__(self, description):
110 self._description = description 102 self._description = description
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 # from all suites, but the buildbot associates the exit status only with the 466 # from all suites, but the buildbot associates the exit status only with the
475 # most recent step). 467 # most recent step).
476 if options.annotate: 468 if options.annotate:
477 return 0 469 return 0
478 else: 470 else:
479 return failed_tests_count 471 return failed_tests_count
480 472
481 473
482 if __name__ == '__main__': 474 if __name__ == '__main__':
483 sys.exit(main(sys.argv)) 475 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/all_android.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698