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

Unified Diff: testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java

Issue 1057783002: Add new GN junit binary template and new GYP java binary template. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed cjhopman's feedback. Created 5 years, 8 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
Index: testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java
diff --git a/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java b/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java
index 28379764291ba694e73c76d2f696b989b567fd45..20c5a657b5b81bab12f2104d76204fdd6114f87e 100644
--- a/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java
+++ b/testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java
@@ -7,16 +7,20 @@ package org.chromium.testing.local;
import java.io.File;
import java.util.HashSet;
import java.util.Set;
+import java.util.regex.Pattern;
/**
* Parses command line arguments for JunitTestMain.
*/
public class JunitTestArgParser {
+ private static final Pattern COLON = Pattern.compile(":");
+
private final Set<String> mPackageFilters;
private final Set<Class<?>> mRunnerFilters;
private final Set<String> mGtestFilters;
private File mJsonOutput;
+ private String[] mTestJars;
public static JunitTestArgParser parse(String[] args) {
@@ -43,6 +47,9 @@ public class JunitTestArgParser {
} else if ("json-results-file".equals(argName)) {
// Read the command line argument after the flag.
parsed.setJsonOutputFile(args[++i]);
+ } else if ("test-jars".equals(argName)) {
+ // Read the command line argument after the flag.
+ parsed.setTestJars(args[++i]);
} else {
System.out.println("Ignoring flag: \"" + argName + "\"");
}
@@ -84,6 +91,10 @@ public class JunitTestArgParser {
return mJsonOutput;
}
+ public String[] getTestJars() {
+ return mTestJars;
+ }
+
private void addPackageFilter(String packageFilter) {
mPackageFilters.add(packageFilter);
}
@@ -100,5 +111,7 @@ public class JunitTestArgParser {
mJsonOutput = new File(path);
}
-}
-
+ private void setTestJars(String jars) {
+ mTestJars = COLON.split(jars);
+ }
+}
« no previous file with comments | « testing/android/junit/BUILD.gn ('k') | testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698