From 300800480f12dc97c8e9d90dd101fabd29203115 Mon Sep 17 00:00:00 2001 From: "yfriedman@chromium.org" Date: Mon, 6 Aug 2012 23:23:51 +0000 Subject: [Android] Add chrome_java target for building Java code in the chromium layer. Also includes a refactoring of the Ant xml scripts to use a common template (contributed by shashishekhar@chromium.org). As part of this, I also continued Torne's effort of removing our reliance on environment variables. Unfortunately this currently means that you have to specify 5 gyp flags: ANDROID_SDK, ANDROID_SDK_ROOT, ANDROID_SDK_TOOLS, ANDROID_SDK_VERSION, ANDROID_TOOLCHAIN. This'll get better as we make further use of the checked in sdk both upstream and downstream. The problem stems from the android tree and released sdk having different configurations. Review URL: https://chromiumcodereview.appspot.com/10830012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150172 0039d316-1c4b-4281-b951-d872f2087c98 --- testing/android/generate_native_test.py | 4 ++-- testing/android/native_test.gyp | 5 +++++ testing/android/native_test_apk.xml | 26 +++++++++++++------------- 3 files changed, 20 insertions(+), 15 deletions(-) (limited to 'testing/android') diff --git a/testing/android/generate_native_test.py b/testing/android/generate_native_test.py index f5c3356..c5fc1ed 100755 --- a/testing/android/generate_native_test.py +++ b/testing/android/generate_native_test.py @@ -145,7 +145,7 @@ class NativeTestApkGenerator(object): """ cmd = ['ant'] if ant_args: - cmd.append(ant_args) + cmd.extend(ant_args) cmd.append("-DAPP_ABI=" + self._target_abi) cmd.extend(['-buildfile', os.path.join(self._output_directory, 'native_test_apk.xml')]) @@ -189,7 +189,7 @@ def main(argv): help=('If specified, build the generated apk with ant. ' 'Otherwise assume compiling within the Android ' 'source tree using Android.mk.')) - parser.add_option('--ant-args', + parser.add_option('--ant-args', action='append', help='extra args for ant') options, _ = parser.parse_args(argv) diff --git a/testing/android/native_test.gyp b/testing/android/native_test.gyp index fb21f27..38d2f39 100644 --- a/testing/android/native_test.gyp +++ b/testing/android/native_test.gyp @@ -39,6 +39,11 @@ 'action': [ 'ant', '-DPRODUCT_DIR=<(ant_build_out)', + '-DANDROID_SDK=<(android_sdk)', + '-DANDROID_SDK_ROOT=<(android_sdk_root)', + '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', + '-DANDROID_SDK_VERSION=<(android_sdk_version)', + '-DANDROID_TOOLCHAIN=<(android_toolchain)', '-buildfile', '<(DEPTH)/testing/android/native_test_apk.xml', ] diff --git a/testing/android/native_test_apk.xml b/testing/android/native_test_apk.xml index 444cf93..64d0e88 100644 --- a/testing/android/native_test_apk.xml +++ b/testing/android/native_test_apk.xml @@ -11,25 +11,25 @@ found in the LICENSE file. Building native test runner ChromeNativeTests_replaceme.apk - - - - - - + + + + + + + + - - - - - -- cgit v1.1