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

Side by Side Diff: testing/android/generate_native_test.py

Issue 10821128: Introduce the --sdk-build flag for Android's native test generator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« build/apk_test.gypi ('K') | « build/apk_test.gypi ('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 # 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 # On Android we build unit test bundles as shared libraries. To run 7 # On Android we build unit test bundles as shared libraries. To run
8 # tests, we launch a special "test runner" apk which loads the library 8 # tests, we launch a special "test runner" apk which loads the library
9 # then jumps into it. Since java is required for many tests 9 # then jumps into it. Since java is required for many tests
10 # (e.g. PathUtils.java), a "pure native" test bundle is inadequate. 10 # (e.g. PathUtils.java), a "pure native" test bundle is inadequate.
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 parser.add_option('--verbose', 173 parser.add_option('--verbose',
174 help='Be verbose') 174 help='Be verbose')
175 parser.add_option('--native_library', 175 parser.add_option('--native_library',
176 help='Full name of native shared library test bundle') 176 help='Full name of native shared library test bundle')
177 parser.add_option('--jars', 177 parser.add_option('--jars',
178 help='Space separated list of jars to be included') 178 help='Space separated list of jars to be included')
179 parser.add_option('--output', 179 parser.add_option('--output',
180 help='Output directory for generated files.') 180 help='Output directory for generated files.')
181 parser.add_option('--app_abi', default='armeabi', 181 parser.add_option('--app_abi', default='armeabi',
182 help='ABI for native shared library') 182 help='ABI for native shared library')
183 parser.add_option('--ant-compile', action='store_true', 183 parser.add_option('--ant-compile', type='int', default=0,
nilesh 2012/08/01 13:49:43 Maybe we should remove "--ant-compile" from DumpRe
Peter Beverloo 2012/08/01 15:11:56 By following Marcus' suggestion about renaming the
184 help=('If specified, build the generated apk with ant. ' 184 help='If set to 1, build the generated apk with ant. '
185 'Otherwise assume compiling within the Android ' 185 'Otherwise assume compiling within the Android '
186 'source tree using Android.mk.')) 186 'source tree using Android.mk.')
187 parser.add_option('--ant-args', 187 parser.add_option('--ant-args',
188 help='extra args for ant') 188 help='extra args for ant')
189 189
190 options, _ = parser.parse_args(argv) 190 options, _ = parser.parse_args(argv)
191 191
192 # It is not an error to specify no native library; the apk should 192 # It is not an error to specify no native library; the apk should
193 # still be generated and build. It will, however, print 193 # still be generated and build. It will, however, print
194 # NATIVE_LOADER_FAILED when run. 194 # NATIVE_LOADER_FAILED when run.
195 if not options.output: 195 if not options.output:
196 raise Exception('No output directory specified for generated files') 196 raise Exception('No output directory specified for generated files')
(...skipping 14 matching lines...) Expand all
211 211
212 if options.ant_compile: 212 if options.ant_compile:
213 ntag.Compile(options.ant_args) 213 ntag.Compile(options.ant_args)
214 else: 214 else:
215 ntag.CompileAndroidMk() 215 ntag.CompileAndroidMk()
216 216
217 logging.warn('COMPLETE.') 217 logging.warn('COMPLETE.')
218 218
219 if __name__ == '__main__': 219 if __name__ == '__main__':
220 sys.exit(main(sys.argv)) 220 sys.exit(main(sys.argv))
OLDNEW
« build/apk_test.gypi ('K') | « build/apk_test.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698