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

Unified Diff: lib/src/runner/configuration.dart

Issue 1709633003: Add the ability to add tags in the test config. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 10 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 | « doc/package_config.md ('k') | lib/src/runner/configuration/load.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/configuration.dart
diff --git a/lib/src/runner/configuration.dart b/lib/src/runner/configuration.dart
index 4371cd619d15ec014a1eb22cb3e8a53cd5d7cc71..6ea51f89e21bdf1621f18684b8a1cb3fd4da6b61 100644
--- a/lib/src/runner/configuration.dart
+++ b/lib/src/runner/configuration.dart
@@ -114,17 +114,20 @@ class Configuration {
/// that isn't enforced.
final Map<String, Configuration> tags;
+ final Set<String> addTags;
+
/// The global test metadata derived from this configuration.
Metadata get metadata => new Metadata(
timeout: timeout,
verboseTrace: verboseTrace,
+ tags: addTags,
forTag: mapMap(tags, value: (_, config) => config.metadata));
/// The set of tags that have been declaredin any way in this configuration.
Set<String> get knownTags {
if (_knownTags != null) return _knownTags;
- var known = includeTags.union(excludeTags);
+ var known = includeTags.union(excludeTags).union(addTags);
tags.forEach((tag, config) {
known.add(tag);
known.addAll(config.knownTags);
@@ -151,7 +154,8 @@ class Configuration {
int pubServePort, int concurrency, Timeout timeout, this.pattern,
Iterable<TestPlatform> platforms, Iterable<String> paths,
Glob filename, Iterable<String> includeTags,
- Iterable<String> excludeTags, Map<String, Configuration> tags})
+ Iterable<String> excludeTags, Iterable<String> addTags,
+ Map<String, Configuration> tags})
: _help = help,
_version = version,
_verboseTrace = verboseTrace,
@@ -172,6 +176,7 @@ class Configuration {
_filename = filename,
includeTags = includeTags?.toSet() ?? new Set(),
excludeTags = excludeTags?.toSet() ?? new Set(),
+ addTags = addTags?.toSet() ?? new Set(),
tags = tags == null ? const {} : new Map.unmodifiable(tags) {
if (_filename != null && _filename.context.style != p.style) {
throw new ArgumentError(
@@ -215,6 +220,7 @@ class Configuration {
filename: other._filename ?? _filename,
includeTags: other.includeTags.union(includeTags),
excludeTags: other.excludeTags.union(excludeTags),
+ addTags: other.addTags.union(addTags),
tags: mergeMaps(tags, other.tags,
value: (config1, config2) => config1.merge(config2)));
}
« no previous file with comments | « doc/package_config.md ('k') | lib/src/runner/configuration/load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698