Skip to content

RazorSourceGeneratorTests should use incremental framework instead of ETW #12759

@chsienki

Description

@chsienki

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions