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

Unified Diff: pkg/testing/lib/src/chain.dart

Issue 2824373002: Add the ability to select a subset of tests using "...". (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/testing/lib/src/chain.dart
diff --git a/pkg/testing/lib/src/chain.dart b/pkg/testing/lib/src/chain.dart
index 351d89b70bd2b1689934538823917b79189e61db..377c205c71bc42b9681435e6f763457b9ef45840 100644
--- a/pkg/testing/lib/src/chain.dart
+++ b/pkg/testing/lib/src/chain.dart
@@ -108,6 +108,10 @@ abstract class ChainContext {
ExpectationSet get expectationSet => ExpectationSet.Default;
Future<Null> run(Chain suite, Set<String> selectors) async {
+ List<String> partialSelectors = selectors
+ .where((s) => s.endsWith('...'))
+ .map((s) => s.substring(0, s.length - 3))
+ .toList();
TestExpectations expectations = await ReadTestExpectations(
<String>[suite.statusFile.toFilePath()], {}, expectationSet);
Stream<TestDescription> stream = list(suite);
@@ -126,7 +130,8 @@ abstract class ChainContext {
String selector = "${suite.name}/${description.shortName}";
if (selectors.isNotEmpty &&
!selectors.contains(selector) &&
- !selectors.contains(suite.name)) {
+ !selectors.contains(suite.name) &&
+ !partialSelectors.any((s) => selector.startsWith(s))) {
continue;
}
final Set<Expectation> expectedOutcomes =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698