[tests] Delete most legacy msbuild tests.#24520
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes most legacy MSBuild tests from the test suite, focusing on tests that were specific to legacy Xamarin (non-.NET) builds. The cleanup involves deleting entire test files, removing legacy test methods, and simplifying helper infrastructure by removing ExecutionMode enum and related code paths.
Changes:
- Removed
ExecutionModeenum and associated logic that supported both MSBuild (legacy) and .NET build modes - Deleted entire test files for legacy-only project types and scenarios (extensions, project variations, binding tests)
- Removed legacy-specific test methods while keeping a few tests that still need .NET equivalents
- Removed
AssertDotNetAvailable()calls since .NET is now the only supported mode
Reviewed changes
Copilot reviewed 41 out of 41 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| TestHelpers/TestBase.cs | Removed Mode field and helper methods for setting up project paths that supported legacy builds |
| TestHelpers/ExecutionMode.cs | Deleted entire file - enum no longer needed with only .NET support |
| TestHelpers/BuildEngine.cs | Simplified RunTarget to only support .NET builds, removed ExecutionMode parameter |
| TargetTests/ValidateAppBundleTaskTests.cs | Deleted entire legacy test file |
| TargetTests/TargetTests.cs | Removed most legacy test methods, kept a few with notes about needed .NET equivalents |
| TargetTests/DetectSigningIdentityTests.cs | Removed AssertDotNetAvailable() call and ExecutionMode parameter |
| TargetTests/CollectAppManifestsTests.cs | Removed AssertDotNetAvailable() call and ExecutionMode parameter |
| RuntimeTests.cs | Deleted entire legacy macOS test file |
| RoslynSmokeTests.cs | Deleted entire legacy macOS Roslyn test file |
| ProjectsTests/* | Deleted 20+ test files for legacy project scenarios |
| TaskTests/MergeAppBundleTaskTest.cs | Removed AssertDotNetAvailable() call |
| TaskTests/GeneratePlistTaskTests_Core.cs | Removed AssertDotNetAvailable() call |
| TaskTests/DetectSdkLocationsTaskTests.cs | Removed legacy SDK version test |
| ConfigurationNUnit.cs | Removed now-unused AssertDotNetAvailable() method |
| ExecutionResult? executionResult; | ||
|
|
||
| public ExecutionResult RunTarget (ApplePlatform platform, ExecutionMode mode, string project, string target, Dictionary<string, string>? properties = null) | ||
| public ExecutionResult RunTarget (ApplePlatform platform, string project, string target, Dictionary<string, string>? properties = null) |
There was a problem hiding this comment.
The platform parameter is now unused after removing the ExecutionMode logic that used it to determine the build mode. Consider removing this parameter to clean up the API, or document why it's being kept if it's needed for future use.
| Configuration.AssertLegacyXamarinAvailable (); | ||
| // .NET: we don't have a test that verifies that the Clean target works as expected, this needs to be added before we can remove this test. |
There was a problem hiding this comment.
These comments indicate incomplete migration work. The comments should either be converted to TODO items with tracking issue links, or if there's already a tracking mechanism, reference it explicitly (e.g., "// TODO: See issue #XXXXX").
| Configuration.AssertLegacyXamarinAvailable (); | ||
| // .NET: we're currently not enabling png optimization (https://github.com/dotnet/macios/issues/20129), we need to enable that, and add a corresponding test, before we can remove this test. |
✅ [CI Build #7e08fd6] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #7e08fd6] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #7e08fd6] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #7e08fd6] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #7e08fd6] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #7e08fd6] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #7e08fd6] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #7e08fd6] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
🚀 [CI Build #7e08fd6] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 119 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
No description provided.