Index: tests/compiler/dart2js/analyze_helper.dart |
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart |
index c3e6729506de0ff985e053ae43b906bc7decc633..41a70ea14a46b07443abc153c723907628ec3998 100644 |
--- a/tests/compiler/dart2js/analyze_helper.dart |
+++ b/tests/compiler/dart2js/analyze_helper.dart |
@@ -5,6 +5,7 @@ |
library analyze_helper; |
import "package:expect/expect.dart"; |
+import 'dart:async'; |
import 'dart:io'; |
import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; |
import '../../../sdk/lib/_internal/compiler/implementation/apiimpl.dart'; |
@@ -113,7 +114,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler { |
} |
} |
-void analyze(List<Uri> uriList, Map<String, List<String>> whiteList) { |
+Future analyze(List<Uri> uriList, Map<String, List<String>> whiteList) { |
var libraryRoot = currentDirectory.resolve('sdk/'); |
var provider = new SourceFileProvider(); |
var handler = new CollectingDiagnosticHandler(whiteList, provider); |
@@ -125,6 +126,7 @@ void analyze(List<Uri> uriList, Map<String, List<String>> whiteList) { |
<String>['--analyze-only', '--analyze-all', |
'--categories=Client,Server']); |
compiler.librariesToAnalyzeWhenRun = uriList; |
- compiler.run(null); |
- handler.checkResults(); |
+ return compiler.run(null).then((_) { |
+ handler.checkResults(); |
+ }); |
} |