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

Side by Side Diff: lib/src/backend/metadata.dart

Issue 1782473005: Add support for configuration presets. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 9 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 | « doc/package_config.md ('k') | lib/src/executable.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:collection'; 5 import 'dart:collection';
6 6
7 import 'package:boolean_selector/boolean_selector.dart'; 7 import 'package:boolean_selector/boolean_selector.dart';
8 import 'package:collection/collection.dart'; 8 import 'package:collection/collection.dart';
9 9
10 import '../frontend/skip.dart'; 10 import '../frontend/skip.dart';
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 skip: skip, 133 skip: skip,
134 verboseTrace: verboseTrace, 134 verboseTrace: verboseTrace,
135 skipReason: skipReason, 135 skipReason: skipReason,
136 tags: tags, 136 tags: tags,
137 onPlatform: onPlatform, 137 onPlatform: onPlatform,
138 forTag: forTag); 138 forTag: forTag);
139 139
140 // If there's no tag-specific metadata, or if none of it applies, just 140 // If there's no tag-specific metadata, or if none of it applies, just
141 // return the metadata as-is. 141 // return the metadata as-is.
142 if (forTag == null || tags == null) return _unresolved(); 142 if (forTag == null || tags == null) return _unresolved();
143 tags = new Set.from(tags);
143 forTag = new Map.from(forTag); 144 forTag = new Map.from(forTag);
144 145
145 // Otherwise, resolve the tag-specific components. Doing this eagerly means 146 // Otherwise, resolve the tag-specific components. Doing this eagerly means
146 // we only have to resolve suite- or group-level tags once, rather than 147 // we only have to resolve suite- or group-level tags once, rather than
147 // doing it for every test individually. 148 // doing it for every test individually.
148 var empty = new Metadata._(); 149 var empty = new Metadata._();
149 var merged = forTag.keys.toList().fold(empty, (merged, selector) { 150 var merged = forTag.keys.toList().fold(empty, (merged, selector) {
150 if (!selector.evaluate(tags)) return merged; 151 if (!selector.evaluate(tags)) return merged;
151 return merged.merge(forTag.remove(selector)); 152 return merged.merge(forTag.remove(selector));
152 }); 153 });
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 _serializeTimeout(Timeout timeout) { 316 _serializeTimeout(Timeout timeout) {
316 if (timeout == Timeout.none) return 'none'; 317 if (timeout == Timeout.none) return 'none';
317 return { 318 return {
318 'duration': timeout.duration == null 319 'duration': timeout.duration == null
319 ? null 320 ? null
320 : timeout.duration.inMicroseconds, 321 : timeout.duration.inMicroseconds,
321 'scaleFactor': timeout.scaleFactor 322 'scaleFactor': timeout.scaleFactor
322 }; 323 };
323 } 324 }
324 } 325 }
OLDNEW
« no previous file with comments | « doc/package_config.md ('k') | lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698