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

Unified Diff: lib/src/runner.dart

Issue 1691173002: Support tag configuration. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes 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 | « lib/src/frontend/tags.dart ('k') | lib/src/runner/configuration.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner.dart
diff --git a/lib/src/runner.dart b/lib/src/runner.dart
index 517e3a09f8c5b2597993b819f249fd93b38e6640..d21868ac4771cfe332c2611730f786256c6a02e3 100644
--- a/lib/src/runner.dart
+++ b/lib/src/runner.dart
@@ -202,8 +202,8 @@ class Runner {
}
// If the user provided tags, skip tests that don't match all of them.
- if (!_config.tags.isEmpty &&
- !test.metadata.tags.containsAll(_config.tags)) {
+ if (!_config.includeTags.isEmpty &&
+ !test.metadata.tags.containsAll(_config.includeTags)) {
return false;
}
@@ -236,7 +236,7 @@ class Runner {
..write(unknownTags.length == 1 ? "A tag was " : "Tags were ")
..write("used that ")
..write(unknownTags.length == 1 ? "wasn't " : "weren't ")
- ..writeln("specified on the command line.");
+ ..writeln("specified in dart_test.yaml.");
unknownTags.forEach((tag, entries) {
buffer.write(" $bold$tag$noColor was used in");
@@ -261,13 +261,13 @@ class Runner {
///
/// This returns a map from tag names to lists of entries that use those tags.
Map<String, List<GroupEntry>> _collectUnknownTags(Suite suite) {
- var knownTags = _config.tags.union(_config.excludeTags);
var unknownTags = {};
var currentTags = new Set();
collect(entry) {
var newTags = new Set();
- for (var unknownTag in entry.metadata.tags.difference(knownTags)) {
+ for (var unknownTag in
+ entry.metadata.tags.difference(_config.knownTags)) {
if (currentTags.contains(unknownTag)) continue;
unknownTags.putIfAbsent(unknownTag, () => []).add(entry);
newTags.add(unknownTag);
« no previous file with comments | « lib/src/frontend/tags.dart ('k') | lib/src/runner/configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698