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

Unified Diff: lib/src/runner/reporter/compact.dart

Issue 1124113002: Add a flag controlling how verbose stack traces are. (Closed) Base URL: git@github.com:dart-lang/test.git@master
Patch Set: Created 5 years, 7 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 | « lib/src/runner/loader.dart ('k') | lib/src/runner/reporter/expanded.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/reporter/compact.dart
diff --git a/lib/src/runner/reporter/compact.dart b/lib/src/runner/reporter/compact.dart
index 5440c1a678625b572fb1fda60afc6e7b5865fb26..74d66a55933254f0fdc7f2ef606a93ca0107177d 100644
--- a/lib/src/runner/reporter/compact.dart
+++ b/lib/src/runner/reporter/compact.dart
@@ -42,6 +42,9 @@ class CompactReporter {
/// this is Windows or not outputting to a terminal.
final String _noColor;
+ /// Whether to use verbose stack traces.
+ final bool _verboseTrace;
+
/// The engine used to run the tests.
final Engine _engine;
@@ -87,12 +90,15 @@ class CompactReporter {
/// Creates a [ConsoleReporter] that will run all tests in [suites].
///
/// [concurrency] controls how many suites are run at once. If [color] is
- /// `true`, this will use terminal colors; if it's `false`, it won't.
- CompactReporter(Iterable<Suite> suites, {int concurrency, bool color: true})
+ /// `true`, this will use terminal colors; if it's `false`, it won't. If
+ /// [verboseTrace] is `true`, this will print core library frames.
+ CompactReporter(Iterable<Suite> suites, {int concurrency, bool color: true,
+ bool verboseTrace: false})
: _multiplePaths = suites.map((suite) => suite.path).toSet().length > 1,
_multiplePlatforms =
suites.map((suite) => suite.platform).toSet().length > 1,
_engine = new Engine(suites, concurrency: concurrency),
+ _verboseTrace = verboseTrace,
_color = color,
_green = color ? '\u001b[32m' : '',
_red = color ? '\u001b[31m' : '',
@@ -144,7 +150,8 @@ class CompactReporter {
if (error.error is! LoadException) {
print(indent(error.error.toString()));
- print(indent(terseChain(error.stackTrace).toString()));
+ var chain = terseChain(error.stackTrace, verbose: _verboseTrace);
+ print(indent(chain.toString()));
return;
}
« no previous file with comments | « lib/src/runner/loader.dart ('k') | lib/src/runner/reporter/expanded.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698