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

Unified Diff: test/io.dart

Issue 1461293005: Add a JSON reporter. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 1 month 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: test/io.dart
diff --git a/test/io.dart b/test/io.dart
index fc727e3dc6103f20d47bf77f2fd32d1bcdb7f32f..1b83064ca17456c28edd57f21cf3f1f41545d2ae 100644
--- a/test/io.dart
+++ b/test/io.dart
@@ -94,18 +94,17 @@ StreamMatcher containsInOrder(Iterable<String> strings) =>
inOrder(strings.map((string) => consumeThrough(contains(string))));
/// Runs the test executable with the package root set properly.
-ScheduledProcess runTest(List args, {bool compact: false,
+ScheduledProcess runTest(List args, {String reporter,
int concurrency, Map<String, String> environment}) {
- if (concurrency == null) concurrency = 1;
+ reporter ??= "expanded";
+ concurrency ??= 1;
var allArgs = [
p.absolute(p.join(packageDir, 'bin/test.dart')),
"--package-root=${p.join(packageDir, 'packages')}",
- "--concurrency=$concurrency"
- ];
-
- if (!compact) allArgs.addAll(["-r", "expanded"]);
- allArgs.addAll(args);
+ "--concurrency=$concurrency",
+ "--reporter=$reporter"
+ ]..addAll(args);
if (environment == null) environment = {};
environment.putIfAbsent("_UNITTEST_USE_COLOR", () => "false");

Powered by Google App Engine
This is Rietveld 408576698