Index: tests/compiler/dart2js/analyze_helper.dart |
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart |
index a91613351a6037eeb7476e46bcc7392b38aa02cc..7d843925e29181010d6c541eb3a642dae78877f5 100644 |
--- a/tests/compiler/dart2js/analyze_helper.dart |
+++ b/tests/compiler/dart2js/analyze_helper.dart |
@@ -137,6 +137,7 @@ typedef bool CheckResults(Compiler compiler, |
Future analyze(List<Uri> uriList, |
Map<String, List<String>> whiteList, |
{bool analyzeAll: true, |
+ bool analyzeMain: false, |
CheckResults checkResults}) { |
String testFileName = |
relativize(Uri.base, Platform.script, Platform.isWindows); |
@@ -159,6 +160,7 @@ Future analyze(List<Uri> uriList, |
var options = <String>[Flags.analyzeOnly, '--categories=Client,Server', |
Flags.showPackageWarnings]; |
if (analyzeAll) options.add(Flags.analyzeAll); |
+ if (analyzeMain) options.add(Flags.analyzeMain); |
var compiler = new Compiler( |
provider, |
null, |
@@ -189,7 +191,7 @@ Future analyze(List<Uri> uriList, |
exit(1); |
} |
} |
- if (analyzeAll) { |
+ if (analyzeAll || analyzeMain) { |
compiler.librariesToAnalyzeWhenRun = uriList; |
return compiler.run(null).then(onCompletion); |
} else { |