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

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

Issue 1003463002: Add json output to Junit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and addressed nyquist's comment. Created 5 years, 9 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 | « testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java
diff --git a/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java b/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java
index d9c468d8470d5af2da99df76bb70f1ba043a69cf..3a305faff5f8dd6eb4abf8a0042acd0494b44d7c 100644
--- a/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java
+++ b/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java
@@ -76,10 +76,12 @@ public final class JunitTestMain {
JunitTestArgParser parser = JunitTestArgParser.parse(args);
JUnitCore core = new JUnitCore();
- GtestLogger logger = new GtestLogger(System.out);
- core.addListener(new GtestListener(logger));
+ GtestLogger gtestLogger = new GtestLogger(System.out);
+ core.addListener(new GtestListener(gtestLogger));
+ JsonLogger jsonLogger = new JsonLogger(parser.getJsonOutputFile());
+ core.addListener(new JsonListener(jsonLogger));
Class[] classes = findClassesFromClasspath();
- Request testRequest = Request.classes(new GtestComputer(logger), classes);
+ Request testRequest = Request.classes(new GtestComputer(gtestLogger), classes);
for (String packageFilter : parser.getPackageFilters()) {
testRequest = testRequest.filterWith(new PackageFilter(packageFilter));
}
« no previous file with comments | « testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698