Index: pkg/front_end/test/fasta/testing/suite.dart |
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart |
index 026750d54bef145ffd118f2169c538010b7d7bc5..dd1f9ba020ad113bb917af1a239104e845b69df6 100644 |
--- a/pkg/front_end/test/fasta/testing/suite.dart |
+++ b/pkg/front_end/test/fasta/testing/suite.dart |
@@ -68,6 +68,10 @@ const String ENABLE_FULL_COMPILE = " full compile "; |
const String AST_KIND_INDEX = " AST kind index "; |
+const String SKIP_KERNEL_GENERATION = " skip kernel generation "; |
+ |
+const String SKIP_RESOLUTION = " skip resolution "; |
+ |
const String EXPECTATIONS = ''' |
[ |
{ |
@@ -111,24 +115,29 @@ class FastaContext extends ChainContext { |
bool updateExpectations, |
bool updateComments, |
bool skipVm, |
+ bool generateKernel, |
+ bool doResolution, |
this.uriTranslator, |
bool fullCompile, |
AstKind astKind) |
: steps = <Step>[ |
- new Outline(fullCompile, astKind, strongMode, |
+ new Outline( |
+ fullCompile, astKind, strongMode, generateKernel, doResolution, |
updateComments: updateComments), |
const Print(), |
- new Verify(fullCompile), |
- new MatchExpectation( |
- fullCompile |
- ? ".${shortenAstKindName(astKind, strongMode)}.expect" |
- : ".outline.expect", |
- updateExpectations: updateExpectations) |
+ new Verify(fullCompile) |
] { |
- if (fullCompile && !skipVm) { |
- steps.add(const Transform()); |
- steps.add(const WriteDill()); |
- steps.add(const Run()); |
+ if (generateKernel) { |
+ steps.add(new MatchExpectation( |
+ fullCompile |
+ ? ".${shortenAstKindName(astKind, strongMode)}.expect" |
+ : ".outline.expect", |
+ updateExpectations: updateExpectations)); |
+ if (fullCompile && !skipVm) { |
+ steps.add(const Transform()); |
+ steps.add(const WriteDill()); |
+ steps.add(const Run()); |
+ } |
} |
} |
@@ -160,6 +169,8 @@ class FastaContext extends ChainContext { |
bool updateExpectations = environment["updateExpectations"] == "true"; |
bool updateComments = environment["updateComments"] == "true"; |
bool skipVm = environment["skipVm"] == "true"; |
+ bool generateKernel = !environment.containsKey(SKIP_KERNEL_GENERATION); |
+ bool doResolution = !environment.containsKey(SKIP_RESOLUTION); |
String astKindString = environment[AST_KIND_INDEX]; |
AstKind astKind = |
astKindString == null ? null : AstKind.values[int.parse(astKindString)]; |
@@ -169,6 +180,8 @@ class FastaContext extends ChainContext { |
updateExpectations, |
updateComments, |
skipVm, |
+ generateKernel, |
+ doResolution, |
uriTranslator, |
environment.containsKey(ENABLE_FULL_COMPILE), |
astKind); |
@@ -213,7 +226,12 @@ class Outline extends Step<TestDescription, Program, FastaContext> { |
final bool strongMode; |
+ final bool generateKernel; |
+ |
+ final bool doResolution; |
+ |
const Outline(this.fullCompile, this.astKind, this.strongMode, |
+ this.generateKernel, this.doResolution, |
{this.updateComments: false}); |
final bool updateComments; |
@@ -242,7 +260,8 @@ class Outline extends Step<TestDescription, Program, FastaContext> { |
const <String, List<Uri>>{}, |
context.uriTranslator.packages); |
KernelTarget sourceTarget = astKind == AstKind.Analyzer |
- ? new AnalyzerTarget(dillTarget, uriTranslator, strongMode) |
+ ? new AnalyzerTarget( |
+ dillTarget, uriTranslator, strongMode, generateKernel, doResolution) |
: new KernelTarget( |
PhysicalFileSystem.instance, dillTarget, uriTranslator); |