summaryrefslogtreecommitdiffstats
path: root/testing/android
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-20 20:54:28 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-20 20:54:28 +0000
commit755be4f221b00a6abec1f0fd62c6e296b3687f7b (patch)
tree189e1f7e2ce7899808e1f55ec070ded6f604764c /testing/android
parent0dad65a1a4cdeab710cc78bfc13c5db609d59484 (diff)
downloadchromium_src-755be4f221b00a6abec1f0fd62c6e296b3687f7b.zip
chromium_src-755be4f221b00a6abec1f0fd62c6e296b3687f7b.tar.gz
chromium_src-755be4f221b00a6abec1f0fd62c6e296b3687f7b.tar.bz2
Move ant call from python to gyp
All of our APKs should be built with build/java_apk.gypi. Currently, native test APKs are built very differently. This change makes them build more like other apks, as a first step to using java_apk.gypi. Since WebKit's gyp files use generate_native_test.py directly, rather than including apk_test.gypi, generate_native_test.py needs to continue to support using it for ant compilation. :( BUG=177121 Review URL: https://chromiumcodereview.appspot.com/12310002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183614 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'testing/android')
-rwxr-xr-xtesting/android/generate_native_test.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/testing/android/generate_native_test.py b/testing/android/generate_native_test.py
index 0dbc7d7..af5bd8c 100755
--- a/testing/android/generate_native_test.py
+++ b/testing/android/generate_native_test.py
@@ -162,6 +162,10 @@ def main(argv):
help='Binary to use for stripping the native libraries.')
parser.add_option('--ant-args', action='append',
help='extra args for ant')
+ parser.add_option('--stamp-file',
+ help='Path to file to touch on success.')
+ parser.add_option('--no-compile', action='store_true',
+ help='Use this flag to disable ant compilation.')
options, _ = parser.parse_args(argv)
@@ -179,22 +183,19 @@ def main(argv):
if not options.strip_binary:
raise Exception('No tool for stripping the libraries has been supplied')
- # Remove all quotes from the jars string and pass the list to ant as
- # INPUT_JARS_PATHS.
- # TODO(cjhopman): Remove this when all targets pass the list of jars as an
- # ant-arg directly.
- jar_list = []
- if options.jars:
- jar_list = options.jars.replace('"', '').split()
- options.ant_args.append('-DINPUT_JARS_PATHS=' + " ".join(jar_list))
-
-
ntag = NativeTestApkGenerator(native_library=options.native_library,
strip_binary=options.strip_binary,
output_directory=options.output,
target_abi=options.app_abi)
+
ntag.CreateBundle()
- ntag.Compile(options.ant_args)
+ if not options.no_compile:
+ ntag.Compile(options.ant_args)
+
+ if options.stamp_file:
+ with file(options.stamp_file, 'a'):
+ os.utime(options.stamp_file, None)
+
logging.info('COMPLETE.')
if __name__ == '__main__':