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

Unified Diff: build/android/gyp/create_test_runner_script.py

Issue 2562063003: Add incremental_apk_by_default GN arg. (Closed)
Patch Set: Remove error formatting Created 4 years 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 | « no previous file | build/config/android/config.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/create_test_runner_script.py
diff --git a/build/android/gyp/create_test_runner_script.py b/build/android/gyp/create_test_runner_script.py
index 511882f69b22f48c2fb535d659f305d5edb1de91..b2d08b8537b07487b3e1b6294359df05e1e3be63 100755
--- a/build/android/gyp/create_test_runner_script.py
+++ b/build/android/gyp/create_test_runner_script.py
@@ -9,6 +9,7 @@
import argparse
import os
+import re
import sys
from util import build_utils
@@ -42,6 +43,14 @@ if __name__ == '__main__':
sys.exit(main())
"""
+
+def _GenerateAdditionalApksErrorString(incremental_apks):
+ err_string = ('Apks that are listed as additional_apks for '
+ 'another target cannot be incremental. Please add never_incremental to '
+ 'the following apks: %s')
+ return err_string % ', '.join(a for a in incremental_apks)
+
+
def main(args):
parser = argparse.ArgumentParser()
parser.add_argument('--script-output-path',
@@ -57,6 +66,8 @@ def main(args):
group.add_argument('--additional-apk', action='append',
dest='additional_apks', default=[])
group.add_argument('--additional-apk-list')
+ group.add_argument('--additional-apk-incremental', action='append',
+ dest='additional_apks_incremental', default=[])
group.add_argument('--apk-under-test')
group.add_argument('--apk-under-test-incremental-install-script')
group.add_argument('--executable-dist-dir')
@@ -86,6 +97,11 @@ def main(args):
test_runner_path_args.extend(
('--additional-apk', RelativizePathToScript(a))
for a in args.additional_apks)
+ if args.additional_apks_incremental:
+ bad_additional_apks = [a for a in args.additional_apks_incremental
+ if a != 'None']
+ if bad_additional_apks:
+ raise Exception(_GenerateAdditionalApksErrorString(bad_additional_apks))
if args.apk_under_test:
test_runner_path_args.append(
('--apk-under-test', RelativizePathToScript(args.apk_under_test)))
« no previous file with comments | « no previous file | build/config/android/config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698