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

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

Issue 1317853006: GN: Make the wrapper script generated for junit work without extra args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/create_java_binary_script.py
diff --git a/build/android/gyp/create_java_binary_script.py b/build/android/gyp/create_java_binary_script.py
index 5de43f2d4a45d7f8b2b73394803926a5b5edd0cc..0f07a1deb759ee50a462ae2c84531f40fe90762c 100755
--- a/build/android/gyp/create_java_binary_script.py
+++ b/build/android/gyp/create_java_binary_script.py
@@ -30,6 +30,7 @@ import sys
self_dir = os.path.dirname(__file__)
classpath = [{classpath}]
+extra_args = {extra_args}
if os.getcwd() != self_dir:
offset = os.path.relpath(self_dir, os.getcwd())
classpath = [os.path.join(offset, p) for p in classpath]
@@ -37,7 +38,7 @@ java_args = [
"java",
"-classpath", ":".join(classpath),
"-enableassertions",
- \"{main_class}\"] + sys.argv[1:]
+ \"{main_class}\"] + extra_args + sys.argv[1:]
os.execvp("java", java_args)
"""
@@ -51,7 +52,7 @@ def main(argv):
help='Name of the java class with the "main" entry point.')
parser.add_option('--classpath', action='append',
help='Classpath for running the jar.')
- options, _ = parser.parse_args(argv)
+ options, extra_args = parser.parse_args(argv)
classpath = [options.jar_path]
for cp_arg in options.classpath:
@@ -63,7 +64,8 @@ def main(argv):
with open(options.output, 'w') as script:
script.write(script_template.format(
classpath=('"%s"' % '", "'.join(classpath)),
- main_class=options.main_class))
+ main_class=options.main_class,
+ extra_args=repr(extra_args)))
os.chmod(options.output, 0750)
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698