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

Unified Diff: testing/android/generate_native_test.py

Issue 10383263: Add the target ABI option for apk based test runner (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« base/base.gyp ('K') | « ipc/ipc.gyp ('k') | ui/ui_unittests.gypi » ('j') | 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 7b7853d2894e2f55f43421ee829813cbc271d520..2097965318c3717b53ab70050af9a90b9e5c0a4c 100755
--- a/testing/android/generate_native_test.py
+++ b/testing/android/generate_native_test.py
@@ -46,10 +46,11 @@ class NativeTestApkGenerator(object):
'native_test_apk.xml',
'res/values/strings.xml']
- def __init__(self, native_library, jars, output_directory):
+ def __init__(self, native_library, jars, output_directory, target_abi):
self._native_library = native_library
self._jars = jars
self._output_directory = output_directory
+ self._target_abi = target_abi
self._root_name = None
if self._native_library:
self._root_name = self._LibraryRoot()
@@ -114,7 +115,7 @@ class NativeTestApkGenerator(object):
def _CopyLibraryAndJars(self):
"""Copy the shlib and jars into the apk source tree (if relevant)"""
if self._native_library:
- destdir = os.path.join(self._output_directory, 'libs/armeabi')
+ destdir = os.path.join(self._output_directory, 'libs/' + self._target_abi)
if not os.path.exists(destdir):
os.makedirs(destdir)
dest = os.path.join(destdir, os.path.basename(self._native_library))
@@ -165,6 +166,8 @@ def main(argv):
help='Include this jar; can be specified multiple times')
parser.add_option('--output',
help='Output directory for generated files.')
+ parser.add_option('--app_abi',
+ help='ABI for native shared library')
parser.add_option('--ant-compile', action='store_true',
help='If specified, build the generated apk with ant')
parser.add_option('--ant-args',
@@ -183,7 +186,8 @@ def main(argv):
ntag = NativeTestApkGenerator(native_library=options.native_library,
jars=options.jar,
- output_directory=options.output)
+ output_directory=options.output,
+ target_abi=options.app_abi)
ntag.CreateBundle()
if options.ant_compile:
ntag.Compile(options.ant_args)
« base/base.gyp ('K') | « ipc/ipc.gyp ('k') | ui/ui_unittests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698