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

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

Issue 1957023002: Add directory option for JUnit coverage files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: doesn't work version Created 4 years, 7 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/android/pylib/junit/test_runner.py » ('j') | build/android/pylib/junit/test_runner.py » ('J')
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 2b6553d0bdaa8e16bee0da4aac746df805240218..ad3bd5ccec28d113846d855ac4ec315453b9ffd4 100755
--- a/build/android/gyp/create_java_binary_script.py
+++ b/build/android/gyp/create_java_binary_script.py
@@ -25,6 +25,7 @@ script_template = """\
#
# This file was generated by build/android/gyp/create_java_binary_script.py
+import argparse
import os
import sys
@@ -37,13 +38,22 @@ if os.getcwd() != self_dir:
classpath = [os.path.join(offset, p) for p in classpath]
bootclasspath = [os.path.join(offset, p) for p in bootclasspath]
java_cmd = ["java"]
+# This is a simple argparser for jvm and jar arguments.
+parser = argparse.ArgumentParser()
+parser.add_argument('-jar-args', nargs='*')
jbudorick 2016/05/09 23:51:49 This should be --jar-args and the nargs parameter
+parser.add_argument('-jvm-args', nargs='*')
jbudorick 2016/05/09 23:51:49 Similarly, this should be --jvm-args and the nargs
+args = parser.parse_args(sys.argv[1:])
+print(args)
+jvm_arguments = args.jvm_args
+jar_arguments = args.jar_args
+java_cmd.extend(jvm_arguments.split())
{noverify_flag}
if bootclasspath:
java_cmd.append("-Xbootclasspath/p:" + ":".join(bootclasspath))
java_cmd.extend(
["-classpath", ":".join(classpath), "-enableassertions", \"{main_class}\"])
java_cmd.extend(extra_program_args)
-java_cmd.extend(sys.argv[1:])
+java_cmd.extend(jar_arguments.split())
os.execvp("java", java_cmd)
"""
« no previous file with comments | « no previous file | build/android/pylib/junit/test_runner.py » ('j') | build/android/pylib/junit/test_runner.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698