@@ -57,11 +57,11 @@ protected static async ValueTask<GeneratorDriver> GetDriverAsync(Project project
5757 return ( result . Item1 , result . Item2 ) ;
5858 }
5959
60- protected static async ValueTask < ( GeneratorDriver , ImmutableArray < AdditionalText > , TestAnalyzerConfigOptionsProvider ) > GetDriverWithAdditionalTextAndProviderAsync ( Project project , Action < TestAnalyzerConfigOptionsProvider > ? configureGlobalOptions = null , bool hostOutputs = false )
60+ protected static async ValueTask < ( GeneratorDriver , ImmutableArray < AdditionalText > , TestAnalyzerConfigOptionsProvider ) > GetDriverWithAdditionalTextAndProviderAsync ( Project project , Action < TestAnalyzerConfigOptionsProvider > ? configureGlobalOptions = null , bool hostOutputs = false , bool trackSteps = false )
6161 {
6262 var razorSourceGenerator = new RazorSourceGenerator ( testUniqueIds : "test" ) . AsSourceGenerator ( ) ;
6363 var disabledOutputs = hostOutputs ? IncrementalGeneratorOutputKind . None : ( IncrementalGeneratorOutputKind ) 0b100000 ;
64- var driver = ( GeneratorDriver ) CSharpGeneratorDriver . Create ( new [ ] { razorSourceGenerator } , parseOptions : ( CSharpParseOptions ) project . ParseOptions ! , driverOptions : new GeneratorDriverOptions ( disabledOutputs , true ) ) ;
64+ var driver = ( GeneratorDriver ) CSharpGeneratorDriver . Create ( new [ ] { razorSourceGenerator } , parseOptions : ( CSharpParseOptions ) project . ParseOptions ! , driverOptions : new GeneratorDriverOptions ( disabledOutputs , trackSteps ) ) ;
6565
6666 var optionsProvider = new TestAnalyzerConfigOptionsProvider ( ) ;
6767 optionsProvider . TestGlobalOptions [ "build_property.RazorConfiguration" ] = "Default" ;
@@ -483,6 +483,9 @@ public static void VerifyTextMatchesBaseline(string actualText, string fileName,
483483 [ Conditional ( "GENERATE_BASELINES" ) ]
484484 private static void GenerateOutputBaseline ( string baselinePath , string text )
485485 {
486+ var directory = Path . GetDirectoryName ( baselinePath ) ! ;
487+ Directory . CreateDirectory ( directory ) ;
488+
486489 text = text . Replace ( "\r " , "" ) . Replace ( "\n " , "\r \n " ) ;
487490 File . WriteAllText ( baselinePath , text , _baselineEncoding ) ;
488491 }
0 commit comments