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

Side by Side Diff: lib/src/runner.dart

Issue 1715583003: Use boolean selector syntax for tags. (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 unified diff | Download patch
« no previous file with comments | « lib/src/backend/metadata.dart ('k') | lib/src/runner/configuration.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:async/async.dart'; 8 import 'package:async/async.dart';
9 9
10 import 'backend/group.dart'; 10 import 'backend/group.dart';
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return loadSuite.changeSuite((suite) { 195 return loadSuite.changeSuite((suite) {
196 _warnForUnknownTags(suite); 196 _warnForUnknownTags(suite);
197 197
198 return suite.filter((test) { 198 return suite.filter((test) {
199 // Skip any tests that don't match the given pattern. 199 // Skip any tests that don't match the given pattern.
200 if (_config.pattern != null && !test.name.contains(_config.pattern)) { 200 if (_config.pattern != null && !test.name.contains(_config.pattern)) {
201 return false; 201 return false;
202 } 202 }
203 203
204 // If the user provided tags, skip tests that don't match all of them. 204 // If the user provided tags, skip tests that don't match all of them.
205 if (!_config.includeTags.isEmpty && 205 if (!_config.includeTags.evaluate(test.metadata.tags)) return false;
206 !test.metadata.tags.containsAll(_config.includeTags)) {
207 return false;
208 }
209 206
210 // Skip tests that do match any tags the user wants to exclude. 207 // Skip tests that do match any tags the user wants to exclude.
211 if (_config.excludeTags.intersection(test.metadata.tags).isNotEmpty) { 208 if (_config.excludeTags.evaluate(test.metadata.tags)) return false;
212 return false;
213 }
214 209
215 return true; 210 return true;
216 }); 211 });
217 }); 212 });
218 }); 213 });
219 } 214 }
220 215
221 /// Prints a warning for any unknown tags referenced in [suite] or its 216 /// Prints a warning for any unknown tags referenced in [suite] or its
222 /// children. 217 /// children.
223 void _warnForUnknownTags(Suite suite) { 218 void _warnForUnknownTags(Suite suite) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 await _debugOperation.valueOrCancellation(); 301 await _debugOperation.valueOrCancellation();
307 }).listen(null); 302 }).listen(null);
308 303
309 var results = await Future.wait([ 304 var results = await Future.wait([
310 _suiteSubscription.asFuture().then((_) => _engine.suiteSink.close()), 305 _suiteSubscription.asFuture().then((_) => _engine.suiteSink.close()),
311 _engine.run() 306 _engine.run()
312 ]); 307 ]);
313 return results.last; 308 return results.last;
314 } 309 }
315 } 310 }
OLDNEW
« no previous file with comments | « lib/src/backend/metadata.dart ('k') | lib/src/runner/configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698