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

Unified 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: y 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/apk_test.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/generate_native_test.py
diff --git a/testing/android/generate_native_test.py b/testing/android/generate_native_test.py
index e71fbbee359b686190276b60fe309d2013f9da2d..f5c33561da48c2d03f143b8bbe473aa2bbf471ce 100755
--- a/testing/android/generate_native_test.py
+++ b/testing/android/generate_native_test.py
@@ -128,9 +128,9 @@ class NativeTestApkGenerator(object):
logging.warn('%s --> %s', jar, dest)
shutil.copyfile(jar, dest)
- def CreateBundle(self, ant_compile):
+ def CreateBundle(self, sdk_build):
"""Create the apk bundle source and assemble components."""
- if not ant_compile:
+ if not sdk_build:
self._SOURCE_FILES.append('Android.mk')
self._REPLACEME_FILES.append('Android.mk')
self._CopyTemplateFilesAndClearDir()
@@ -180,6 +180,11 @@ def main(argv):
help='Output directory for generated files.')
parser.add_option('--app_abi', default='armeabi',
help='ABI for native shared library')
+ parser.add_option('--sdk-build', type='int', default=1,
+ help='Unless set to 0, build the generated apk with ant. '
+ 'Otherwise assume compiling within the Android '
+ 'source tree using Android.mk.')
+ # FIXME(beverloo): Remove --ant-compile when all users adopted.
parser.add_option('--ant-compile', action='store_true',
help=('If specified, build the generated apk with ant. '
'Otherwise assume compiling within the Android '
@@ -207,9 +212,9 @@ def main(argv):
jars=jar_list,
output_directory=options.output,
target_abi=options.app_abi)
- ntag.CreateBundle(options.ant_compile)
+ ntag.CreateBundle(options.sdk_build or options.ant_compile)
- if options.ant_compile:
+ if options.sdk_build or options.ant_compile:
ntag.Compile(options.ant_args)
else:
ntag.CompileAndroidMk()
« no previous file with comments | « build/apk_test.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698