Today the tests in RazorSourceGeneratorTests use the ETW events to determine which parts of the generators ran. This is fragile as parallel tests can contribute to this, meaning we have to run them in sequential order.
Instead, we should use the incremental testing framework, an example of which is here: https://github.com/dotnet/runtime/blob/d78c24c497f5ae9046d6f61f85d0066d8a159b60/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorIncrementalTests.cs
We already partially do this, but should completely replace all uses of ETW with it. We may need to add more .WithTrackingName calls to the generator itself in order to access each step that is currently tracked with ETW.
Today the tests in RazorSourceGeneratorTests use the ETW events to determine which parts of the generators ran. This is fragile as parallel tests can contribute to this, meaning we have to run them in sequential order.
Instead, we should use the incremental testing framework, an example of which is here: https://github.com/dotnet/runtime/blob/d78c24c497f5ae9046d6f61f85d0066d8a159b60/src/libraries/Microsoft.Extensions.Logging.Abstractions/tests/Microsoft.Extensions.Logging.Generators.Tests/LoggerMessageGeneratorIncrementalTests.cs
We already partially do this, but should completely replace all uses of ETW with it. We may need to add more
.WithTrackingNamecalls to the generator itself in order to access each step that is currently tracked with ETW.