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([ |