Repository navigation
Reorganize compatibility test projects under test/Compatibility - #55240
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reorganizes the compatibility-related test projects into a dedicated test/Compatibility/ folder structure that mirrors src/Compatibility/, and updates solution/test orchestration files to reference the new locations. This supports cleaner repo navigation and enables robust path-based test scoping (e.g., test/Compatibility/**) for conditional PR test filtering (#55203).
Changes:
- Moved the compatibility test projects under
test/Compatibility/{ApiCompat,ApiDiff,GenAPI}(withMicrosoft.DotNet.ApiSymbolExtensions.Testsattest/Compatibility/). - Updated cross-project references and compile-includes to use
$(RepoRoot)paths for location independence. - Updated
sdk.slnx, compatibility*.slnffilters,test/UnitTests.proj, andCODEOWNERSto match the new layout.
Reviewed changes
Copilot reviewed 15 out of 97 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTests.proj | Updates custom test project paths to the new test/Compatibility/... locations. |
| test/Compatibility/Microsoft.DotNet.ApiSymbolExtensions.Tests/Microsoft.DotNet.ApiSymbolExtensions.Tests.csproj | Updates ProjectReference to use $(RepoRoot) for the MSTest framework project. |
| test/Compatibility/Microsoft.DotNet.ApiSymbolExtensions.Tests/TestLog.cs | Relocated test logging helper under test/Compatibility. |
| test/Compatibility/Microsoft.DotNet.ApiSymbolExtensions.Tests/TempDirectory.cs | Relocated temp directory helper under test/Compatibility. |
| test/Compatibility/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFilterFactoryTests.cs | Relocated ApiSymbolExtensions tests under test/Compatibility. |
| test/Compatibility/Microsoft.DotNet.ApiSymbolExtensions.Tests/SymbolFactory.cs | Relocated Roslyn compilation helper for tests under test/Compatibility. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/Microsoft.DotNet.GenAPI.Tests.csproj | Adds/relocates GenAPI unit test project under test/Compatibility/GenAPI. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/TestAssemblyLoaderFactory.cs | Relocated helper used to build/load assemblies for GenAPI-related tests. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/TempDirectory.cs | Relocated temp directory helper used by GenAPI tests. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/SymbolFactory.cs | Relocated Roslyn compilation helper used by GenAPI tests. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/CSharpSyntaxRewriterTestBase.cs | Relocated GenAPI syntax rewriter test base. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/BodyBlockCSharpSyntaxRewriterTests.cs | Relocated GenAPI syntax rewriter tests. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/SingleLineStatementCSharpSyntaxRewriterTests.cs | Relocated GenAPI syntax rewriter tests. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.Tests/SyntaxRewriter/TypeDeclarationCSharpSyntaxRewriterTests.cs | Relocated GenAPI syntax rewriter tests. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.IntegrationTests/Microsoft.DotNet.GenAPI.IntegrationTests.csproj | Updates ProjectReference to MSTest framework project via $(RepoRoot) after move. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.IntegrationTests/ToolPaths.cs | Relocated tool path resolution helper for GenAPI integration tests. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.IntegrationTests/Tool/GenAPIToolIntegrationTests.cs | Relocated GenAPI tool end-to-end integration tests. |
| test/Compatibility/GenAPI/Microsoft.DotNet.GenAPI.IntegrationTests/Task/GenAPITaskIntegrationTests.cs | Relocated GenAPI task end-to-end integration tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Microsoft.DotNet.ApiDiff.Tests.csproj | Updates compile-includes to point at relocated shared test helpers under test/Compatibility. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Base.Tests.cs | Relocated ApiDiff base test harness under test/Compatibility/ApiDiff. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Assembly.Tests.cs | Relocated ApiDiff assembly-level tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Class.Tests.cs | Relocated ApiDiff class diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Constructor.Tests.cs | Relocated ApiDiff constructor diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Delegate.Tests.cs | Relocated ApiDiff delegate diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Destructor.Tests.cs | Relocated ApiDiff destructor diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Event.Tests.cs | Relocated ApiDiff event diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Field.Tests.cs | Relocated ApiDiff field diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Interface.Tests.cs | Relocated ApiDiff interface diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Method.Tests.cs | Relocated ApiDiff method diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Record.Tests.cs | Relocated ApiDiff record diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.Tests/Diff.Struct.Tests.cs | Relocated ApiDiff struct diff tests. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.IntegrationTests/Microsoft.DotNet.ApiDiff.IntegrationTests.csproj | Updates ProjectReference to MSTest framework project via $(RepoRoot) after move. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.IntegrationTests/ToolPaths.cs | Relocated ApiDiff tool path resolution helper. |
| test/Compatibility/ApiDiff/Microsoft.DotNet.ApiDiff.IntegrationTests/Tool/ApiDiffToolIntegrationTests.cs | Relocated ApiDiff tool end-to-end integration tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Microsoft.DotNet.ApiCompatibility.Tests.csproj | Updates compile-includes and MSTest framework reference to $(RepoRoot) paths after move. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/CompatDifferenceTests.cs | Relocated ApiCompatibility unit tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/CustomSideNameTests.cs | Relocated ApiCompatibility unit tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/SuppressibleTestLog.cs | Relocated shared suppressible log helper. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/SymbolFactoryExtensions.cs | Relocated shared SymbolFactory extensions used across ApiCompat tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/TestRuleFactory.cs | Relocated helper rule factory for tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/TheoryData.cs | Relocated helper TheoryData type for DynamicData scenarios. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblyMapperTests.cs | Relocated mapping tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/AssemblySetMapperTests.cs | Relocated mapping tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/MemberMapperTests.cs | Relocated mapping tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/NamespaceMapperTests.cs | Relocated mapping tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Mapping/TypeMapperTests.cs | Relocated mapping tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatOptionsTests.cs | Relocated runner tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatRunnerTests.cs | Relocated runner tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Runner/ApiCompatWorkItemTests.cs | Relocated runner tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotAddMemberToInterfaceTests.cs | Relocated rule tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Rules/CannotChangeGenericConstraintsTests.cs | Relocated rule tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Rules/EnumsMustMatchTests.cs | Relocated rule tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Rules/ParameterNamesCannotChangeTests.cs | Relocated rule tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Logging/EmptyTestSuppressionEngine.cs | Relocated logging/suppression test helpers. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Logging/SuppressionTests.cs | Relocated logging/suppression tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompatibility.Tests/Logging/TestSuppressionEngine.cs | Relocated logging/suppression test helpers. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation.Tests/Microsoft.DotNet.PackageValidation.Tests.csproj | Updates shared compile-includes and MSTest framework reference to $(RepoRoot) paths after move. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation.Tests/CompatibleFrameworkInPackageValidatorTests.cs | Relocated package validation tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation.Tests/Filtering/TargetFrameworkFilterTests.cs | Relocated package validation filter tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation.Tests/Validators/BaselinePackageValidatorTests.cs | Relocated package validation validator tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.PackageValidation.Tests/Validators/CompatibleTFMValidatorTests.cs | Relocated package validation validator tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tests/Microsoft.DotNet.ApiCompat.Tests.csproj | Adds/relocates ApiCompat unit test project under test/Compatibility/ApiCompat. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Tests/RegexStringTransformerTests.cs | Relocated ApiCompat unit tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.IntegrationTests/Microsoft.DotNet.ApiCompat.IntegrationTests.csproj | Updates MSTest framework ProjectReference to $(RepoRoot) after move. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.IntegrationTests/ToolPaths.cs | Relocated ApiCompat tool path resolution helper. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.IntegrationTests/Tool/ApiCompatToolIntegrationTests.cs | Relocated ApiCompat tool end-to-end integration tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidateAssembliesTargetIntegrationTests.cs | Relocated ApiCompat task integration tests. |
| test/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.IntegrationTests/Task/ValidatePackageTargetIntegrationTests.cs | Relocated ApiCompat task integration tests. |
| src/Tasks/Microsoft.NET.slnf | Updates solution filter project paths for moved compatibility test projects. |
| src/Compatibility/compatibility.slnf | Updates compatibility solution filter paths to the new test locations. |
| src/Compatibility/ApiCompat/apicompat.slnf | Updates ApiCompat solution filter to point at relocated tests. |
| src/Compatibility/ApiDiff/apidiff.slnf | Updates ApiDiff solution filter to point at relocated tests. |
| src/Compatibility/GenAPI/genapi.slnf | Updates GenAPI solution filter to point at relocated tests. |
| sdk.slnx | Updates solution folder/project structure under /test/Compatibility to reflect new layout. |
| CODEOWNERS | Consolidates compatibility ownership to /src/Compatibility/ and /test/Compatibility/. |
MichaelSimons
force-pushed
the
michaelsimons-reorg-compat-tests
branch
from
July 10, 2026 17:23
c81381a to
62bac03
Compare
Reorganize the compatibility test projects to mirror the src/Compatibility
layout, nesting them under test/Compatibility/{ApiCompat,ApiDiff,GenAPI} (with
ApiSymbolExtensions.Tests at the Compatibility top level, matching src). This
groups the compat tests together, reduces the width of the flat test/ directory,
and makes ownership and test-filtering globs robust to newly added projects.
Cross-project references are converted to $(RepoRoot)test\Compatibility\... form
for location independence. Solution (sdk.slnx), solution filters,
test/UnitTests.proj, and CODEOWNERS are updated to the new paths; the compat
CODEOWNERS entries are consolidated to /src/Compatibility/ and /test/Compatibility/.
Co-authored-by: Copilot App <[email protected]>
MichaelSimons
force-pushed
the
michaelsimons-reorg-compat-tests
branch
from
July 20, 2026 16:31
62bac03 to
81ad5d0
Compare
Member
Author
|
Gentle ping @dotnet/area-infrastructure-libraries for review. TIA |
jeffhandley
approved these changes
Jul 21, 2026
jeffhandley
left a comment
Member
There was a problem hiding this comment.
Bravo. Thanks for the ping on this, @MichaelSimons!
This was referenced Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Groups the compatibility test projects into a dedicated
test/Compatibility/folder that mirrors the existingsrc/Compatibility/layout, as a step toward cleaning up the very wide flat top-leveltest/directory and giving these tests a clearer, more maintainable home.Projects are nested by tool to match source:
ApiCompat/,ApiDiff/,GenAPI/, withMicrosoft.DotNet.ApiSymbolExtensions.Testsat theCompatibilitytop level (matching where it sits undersrc).Motivation
test/directory has grown very wide (many sibling test assemblies); grouping related projects into subfolders makes it easier to navigate and reason about ownership.src/Compatibility/keeps source and tests structurally aligned.test/Compatibility/**glob instead of fragile per-project name patterns that silently miss newly added projects.Changes
test/Compatibility/{ApiCompat,ApiDiff,GenAPI}(+ApiSymbolExtensions.Testsat top level).$(RepoRoot)test\Compatibility\...for location independence.sdk.slnx, the compatibility solution filters, andtest/UnitTests.proj./src/Compatibility/and/test/Compatibility/.Validation
build.cmd -projects src\Compatibility\compatibility.slnf— build succeeded; all 9 test projects compile.