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

Unified Diff: lib/src/runner/loader.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/frontend/throws_matcher.dart ('k') | lib/src/runner/reporter/compact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/loader.dart
diff --git a/lib/src/runner/loader.dart b/lib/src/runner/loader.dart
index f3122fc1c65c75f1208ca319350401930b5120f4..548d976052c196a3970830751a473687628fb8a8 100644
--- a/lib/src/runner/loader.dart
+++ b/lib/src/runner/loader.dart
@@ -33,6 +33,9 @@ class Loader {
/// Whether to enable colors for Dart compilation.
final bool _color;
+ /// Global metadata that applies to all test suites.
+ final Metadata _metadata;
+
/// The root directory that will be served for browser tests.
final String _root;
@@ -78,14 +81,17 @@ class Loader {
///
/// If [color] is true, console colors will be used when compiling Dart.
///
+ /// [metadata] is the global metadata for all test suites.
+ ///
/// If the package root doesn't exist, throws an [ApplicationException].
Loader(Iterable<TestPlatform> platforms, {String root, String packageRoot,
- Uri pubServeUrl, bool color: false})
+ Uri pubServeUrl, bool color: false, Metadata metadata})
: _platforms = platforms.toList(),
_pubServeUrl = pubServeUrl,
_root = root == null ? p.current : root,
_packageRoot = packageRootFor(root, packageRoot),
- _color = color;
+ _color = color,
+ _metadata = metadata == null ? new Metadata() : metadata;
/// Loads all test suites in [dir].
///
@@ -123,6 +129,7 @@ class Loader {
return new Stream.fromFuture(
new Future.error(new LoadException(path, error), stackTrace));
}
+ suiteMetadata = _metadata.merge(suiteMetadata);
var controller = new StreamController();
Future.forEach(_platforms, (platform) {
« no previous file with comments | « lib/src/frontend/throws_matcher.dart ('k') | lib/src/runner/reporter/compact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698