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

Side by Side Diff: lib/src/runner/configuration.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.runner.configuration; 5 library test.runner.configuration;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:args/args.dart'; 10 import 'package:args/args.dart';
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 help: 'The port of a pub serve instance serving "test/".', 58 help: 'The port of a pub serve instance serving "test/".',
59 valueHelp: 'port'); 59 valueHelp: 'port');
60 parser.addFlag("pause-after-load", 60 parser.addFlag("pause-after-load",
61 help: 'Pauses for debugging before any tests execute.\n' 61 help: 'Pauses for debugging before any tests execute.\n'
62 'Implies --concurrency=1.\n' 62 'Implies --concurrency=1.\n'
63 'Currently only supported for browser tests.', 63 'Currently only supported for browser tests.',
64 negatable: false); 64 negatable: false);
65 parser.addOption("reporter", 65 parser.addOption("reporter",
66 abbr: 'r', 66 abbr: 'r',
67 help: 'The runner used to print test results.', 67 help: 'The runner used to print test results.',
68 allowed: ['compact', 'expanded'], 68 allowed: ['compact', 'expanded', 'json'],
69 defaultsTo: Platform.isWindows ? 'expanded' : 'compact', 69 defaultsTo: Platform.isWindows ? 'expanded' : 'compact',
70 allowedHelp: { 70 allowedHelp: {
71 'compact': 'A single line, updated continuously.', 71 'compact': 'A single line, updated continuously.',
72 'expanded': 'A separate line for each update.' 72 'expanded': 'A separate line for each update.',
73 'json': 'A machine-readable format (see https://goo.gl/0HRhdZ).'
73 }); 74 });
74 parser.addFlag("verbose-trace", negatable: false, 75 parser.addFlag("verbose-trace", negatable: false,
75 help: 'Whether to emit stack traces with core library frames.'); 76 help: 'Whether to emit stack traces with core library frames.');
76 parser.addFlag("js-trace", negatable: false, 77 parser.addFlag("js-trace", negatable: false,
77 help: 'Whether to emit raw JavaScript stack traces for browser tests.'); 78 help: 'Whether to emit raw JavaScript stack traces for browser tests.');
78 parser.addFlag("color", defaultsTo: null, 79 parser.addFlag("color", defaultsTo: null,
79 help: 'Whether to use terminal colors.\n(auto-detected by default)'); 80 help: 'Whether to use terminal colors.\n(auto-detected by default)');
80 81
81 return parser; 82 return parser;
82 })(); 83 })();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 pubServeUrl = pubServePort == null 202 pubServeUrl = pubServePort == null
202 ? null 203 ? null
203 : Uri.parse("http://localhost:$pubServePort"), 204 : Uri.parse("http://localhost:$pubServePort"),
204 concurrency = pauseAfterLoad 205 concurrency = pauseAfterLoad
205 ? 1 206 ? 1
206 : (concurrency == null ? _defaultConcurrency : concurrency), 207 : (concurrency == null ? _defaultConcurrency : concurrency),
207 platforms = platforms == null ? [TestPlatform.vm] : platforms.toList(), 208 platforms = platforms == null ? [TestPlatform.vm] : platforms.toList(),
208 paths = paths == null ? ["test"] : paths.toList(), 209 paths = paths == null ? ["test"] : paths.toList(),
209 explicitPaths = paths != null; 210 explicitPaths = paths != null;
210 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698