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

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

Issue 1462363002: [Android] Make generated test scripts pass apk paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/android/gyp/write_build_config.py » ('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 22ef260125e298939bd7f7a859e135c4aa6148bb..e5e56532d4a0224ec14db769154d703b8c72d620 100755
--- a/build/android/gyp/create_test_runner_script.py
+++ b/build/android/gyp/create_test_runner_script.py
@@ -44,7 +44,7 @@ if __name__ == '__main__':
sys.exit(main())
"""
-def main():
+def main(args):
parser = argparse.ArgumentParser()
parser.add_argument('--script-output-path',
help='Output path for executable script.')
@@ -56,7 +56,10 @@ def main():
group = parser.add_argument_group('Test runner path arguments.')
group.add_argument('--output-directory')
group.add_argument('--isolate-file-path')
- args, test_runner_args = parser.parse_known_args()
+ group.add_argument('--apk-under-test')
+ group.add_argument('--test-apk')
+ args, test_runner_args = parser.parse_known_args(
+ build_utils.ExpandFileArgs(args))
def RelativizePathToScript(path):
"""Returns the path relative to the output script directory."""
@@ -73,6 +76,12 @@ def main():
if args.isolate_file_path:
test_runner_path_args['--isolate-file-path'] = RelativizePathToScript(
args.isolate_file_path)
+ if args.apk_under_test:
+ test_runner_path_args['--apk-under-test'] = RelativizePathToScript(
+ args.apk_under_test)
+ if args.test_apk:
+ test_runner_path_args['--test-apk'] = RelativizePathToScript(
+ args.test_apk)
with open(args.script_output_path, 'w') as script:
script.write(SCRIPT_TEMPLATE.format(
@@ -88,4 +97,4 @@ def main():
build_utils.GetPythonDependencies())
if __name__ == '__main__':
- sys.exit(main())
+ sys.exit(main(sys.argv[1:]))
« no previous file with comments | « no previous file | build/android/gyp/write_build_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698