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

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

Issue 1092153003: Support an @OnPlatform annotation. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 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 | « lib/src/frontend/on_platform.dart ('k') | lib/src/runner/parse_metadata.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/loader.dart
diff --git a/lib/src/runner/loader.dart b/lib/src/runner/loader.dart
index a6db18d7904bd404930fe26633a5eaae728f9b4a..dbc3014c440afae7b38104be0ed2ede255428731 100644
--- a/lib/src/runner/loader.dart
+++ b/lib/src/runner/loader.dart
@@ -112,13 +112,13 @@ class Loader {
///
/// This will emit a [LoadException] if the file fails to load.
Stream<Suite> loadFile(String path) {
- var metadata;
+ var suiteMetadata;
try {
- metadata = parseMetadata(path);
+ suiteMetadata = parseMetadata(path);
} on AnalyzerErrorGroup catch (_) {
// Ignore the analyzer's error, since its formatting is much worse than
// the VM's or dart2js's.
- metadata = new Metadata();
+ suiteMetadata = new Metadata();
} on FormatException catch (error, stackTrace) {
return new Stream.fromFuture(
new Future.error(new LoadException(path, error), stackTrace));
@@ -126,10 +126,12 @@ class Loader {
var controller = new StreamController();
Future.forEach(_platforms, (platform) {
- if (!metadata.testOn.evaluate(platform, os: currentOS)) {
+ if (!suiteMetadata.testOn.evaluate(platform, os: currentOS)) {
return null;
}
+ var metadata = suiteMetadata.forPlatform(platform, os: currentOS);
+
// Don't load a skipped suite.
if (metadata.skip) {
controller.add(new Suite([
« no previous file with comments | « lib/src/frontend/on_platform.dart ('k') | lib/src/runner/parse_metadata.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698