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

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

Issue 10693110: [android] Split top-level scripts and libraries from build/android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added __init__.py and enable_asserts.py. 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
Satish 2012/07/06 13:21:36 switch to new format?
bulach 2012/07/06 13:42:09 Done.
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 # On Android we build unit test bundles as shared libraries. To run 6 # On Android we build unit test bundles as shared libraries. To run
7 # tests, we launch a special "test runner" apk which loads the library 7 # tests, we launch a special "test runner" apk which loads the library
8 # then jumps into it. Since java is required for many tests 8 # then jumps into it. Since java is required for many tests
9 # (e.g. PathUtils.java), a "pure native" test bundle is inadequate. 9 # (e.g. PathUtils.java), a "pure native" test bundle is inadequate.
10 # 10 #
11 # This script, generate_native_test.py, is used to generate the source 11 # This script, generate_native_test.py, is used to generate the source
12 # for an apk that wraps a unit test shared library bundle. That 12 # for an apk that wraps a unit test shared library bundle. That
13 # allows us to have a single boiler-plate application be used across 13 # allows us to have a single boiler-plate application be used across
14 # all unit test bundles. 14 # all unit test bundles.
15 15
16 import logging 16 import logging
17 import optparse 17 import optparse
18 import os 18 import os
19 import re 19 import re
20 import shutil 20 import shutil
21 import subprocess 21 import subprocess
22 import sys 22 import sys
23 23
24 # cmd_helper.py is under ../../build/android/ 24 # cmd_helper.py is under ../../build/android/
25 sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 25 sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..',
26 '..', 'build', 'android'))) 26 '..', 'build', 'android')))
27 import cmd_helper # pylint: disable=F0401 27 from pylib import cmd_helper # pylint: disable=F0401
28 28
29 29
30 class NativeTestApkGenerator(object): 30 class NativeTestApkGenerator(object):
31 """Generate a native test apk source tree. 31 """Generate a native test apk source tree.
32 32
33 TODO(jrg): develop this more so the activity name is replaced as 33 TODO(jrg): develop this more so the activity name is replaced as
34 well. That will allow multiple test runners to be installed at the 34 well. That will allow multiple test runners to be installed at the
35 same time. (The complication is that it involves renaming a java 35 same time. (The complication is that it involves renaming a java
36 class, which implies regeneration of a jni header, and on and on...) 36 class, which implies regeneration of a jni header, and on and on...)
37 """ 37 """
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 if options.ant_compile: 210 if options.ant_compile:
211 ntag.Compile(options.ant_args) 211 ntag.Compile(options.ant_args)
212 else: 212 else:
213 ntag.CompileAndroidMk() 213 ntag.CompileAndroidMk()
214 214
215 logging.warn('COMPLETE.') 215 logging.warn('COMPLETE.')
216 216
217 if __name__ == '__main__': 217 if __name__ == '__main__':
218 sys.exit(main(sys.argv)) 218 sys.exit(main(sys.argv))
OLDNEW
« build/android/enable_asserts.py ('K') | « build/android/valgrind_tools.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698