| 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 9de7874dc7db37ffd3d1babc321c8f7702e569fc..28379764291ba694e73c76d2f696b989b567fd45 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
|
| @@ -4,6 +4,7 @@
|
|
|
| package org.chromium.testing.local;
|
|
|
| +import java.io.File;
|
| import java.util.HashSet;
|
| import java.util.Set;
|
|
|
| @@ -15,6 +16,7 @@ public class JunitTestArgParser {
|
| private final Set<String> mPackageFilters;
|
| private final Set<Class<?>> mRunnerFilters;
|
| private final Set<String> mGtestFilters;
|
| + private File mJsonOutput;
|
|
|
| public static JunitTestArgParser parse(String[] args) {
|
|
|
| @@ -38,6 +40,9 @@ public class JunitTestArgParser {
|
| } else if ("gtest-filter".equals(argName)) {
|
| // Read the command line argument after the flag.
|
| parsed.addGtestFilter(args[++i]);
|
| + } else if ("json-results-file".equals(argName)) {
|
| + // Read the command line argument after the flag.
|
| + parsed.setJsonOutputFile(args[++i]);
|
| } else {
|
| System.out.println("Ignoring flag: \"" + argName + "\"");
|
| }
|
| @@ -60,6 +65,7 @@ public class JunitTestArgParser {
|
| mPackageFilters = new HashSet<String>();
|
| mRunnerFilters = new HashSet<Class<?>>();
|
| mGtestFilters = new HashSet<String>();
|
| + mJsonOutput = null;
|
| }
|
|
|
| public Set<String> getPackageFilters() {
|
| @@ -74,6 +80,10 @@ public class JunitTestArgParser {
|
| return mGtestFilters;
|
| }
|
|
|
| + public File getJsonOutputFile() {
|
| + return mJsonOutput;
|
| + }
|
| +
|
| private void addPackageFilter(String packageFilter) {
|
| mPackageFilters.add(packageFilter);
|
| }
|
| @@ -86,5 +96,9 @@ public class JunitTestArgParser {
|
| mGtestFilters.add(gtestFilter);
|
| }
|
|
|
| + private void setJsonOutputFile(String path) {
|
| + mJsonOutput = new File(path);
|
| + }
|
| +
|
| }
|
|
|
|
|