[xharness] Enable nullability, and fix any errors.#25160
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Updates the tests/xharness harness to compile with nullable reference types enabled, while also removing the xharness unit test project and its sample assets (per the PR description) to reduce maintenance burden.
Changes:
- Enable
<Nullable>enable</Nullable>for xharness and update code to satisfy nullable warnings. - Refactor xharness Jenkins/task plumbing away from several
I*interfaces toward concrete types and nullable-aware APIs. - Remove
Xharness.Testsproject (tests + samples) and editor launch/task configs.
Reviewed changes
Copilot reviewed 83 out of 84 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/xharness/xharness.slnx | Removes the Xharness.Tests project from the solution. |
| tests/xharness/xharness.csproj | Enables nullable, switches back to default compile items, and removes test/importer compile exclusions. |
| tests/xharness/XmlDocumentExtensions.cs | Nullable-related signature changes and null-suppression updates in save helper. |
| tests/xharness/Xharness.Tests/app.config | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Xharness.Tests.csproj | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Tests/TestTargetExtensionsTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Tests/TestPlatformExtensionsTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Tests/AppRunnerTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/TestImporter/Xamarin/Tests/XamariniOSTemplateTest.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/TestImporter/Xamarin/Tests/TestAssemblyDefinitionTest.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/TestImporter/Xamarin/Tests/AssemblyLocatorTest.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/TestImporter/Tests/ProjectDefinitionTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/TestImporter/Templates/Tests/PListExtensionsTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/xUnitSample.xml | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/run-log.txt | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/devices.xml | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/TestProject/SystemXunit.csproj | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/TestProject/Info.plist | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/NUnitV3SampleSuccess.xml | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/NUnitV3SampleFailure.xml | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/NUnitV3Sample.xml | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Samples/NUnitV2Sample.xml | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Jenkins/TestSelectorTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Jenkins/TestSelectionTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Jenkins/ResourceManagerTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Jenkins/PeriodicCommandTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Jenkins/MarkdownReportWriterTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Jenkins/JenkinsDeviceLoadterTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Jenkins/ITestTaskExtensionsTests.cs | Removed (tests project deleted). |
| tests/xharness/Xharness.Tests/Jenkins/ErrorKnowledgeBaseTests.cs | Removed (tests project deleted). |
| tests/xharness/TestReporterFactory.cs | Nullable annotations added for optional parameters. |
| tests/xharness/TestReporter.cs | Nullable annotations + null-suppression adjustments in parsing/reporting paths. |
| tests/xharness/TestProject.cs | Makes Name non-null, refactors to use TestTask, and adjusts platform-name substitution. |
| tests/xharness/TestPlatformExtensions.cs | Makes ToPlatformName nullable and returns null for unknown/flag combinations. |
| tests/xharness/Program.cs | Enables nullable and updates CLI help callback to be nullable-aware. |
| tests/xharness/Jenkins/TestVariationsFactory.cs | Removes interface, adds nullability to configuration/variation logic, and updates cloning/build task types. |
| tests/xharness/Jenkins/TestTasks/TestTask.cs | Renames base task type and updates many members to nullable-aware forms; removes ITestTask implementation. |
| tests/xharness/Jenkins/TestTasks/RunXITask.cs | Publicizes type and updates runner/device fields to be nullable-aware. |
| tests/xharness/Jenkins/TestTasks/RunTestTask.cs | Removes IRunTestTask interface usage and shifts to concrete task/build types with nullable updates. |
| tests/xharness/Jenkins/TestTasks/RunTest.cs | Switches to concrete RunTestTask/BuildToolTask and nullable working directory. |
| tests/xharness/Jenkins/TestTasks/RunSimulatorTask.cs | Switches to concrete simulator loader type and nullable acquired resource handling. |
| tests/xharness/Jenkins/TestTasks/RunSimulator.cs | Switches to concrete RunSimulatorTask/SimulatorLoader and adds null-suppression where required. |
| tests/xharness/Jenkins/TestTasks/RunDeviceTask.cs | Removes IRunDeviceTask interface usage and updates nullable progress message. |
| tests/xharness/Jenkins/TestTasks/RunDevice.cs | Switches to concrete RunDeviceTask and adds nullable tunnel handling / runner null-suppression. |
| tests/xharness/Jenkins/TestTasks/Resource.cs | Nullable description + safe dequeue typing updates. |
| tests/xharness/Jenkins/TestTasks/MacTask.cs | Nullable Mode override. |
| tests/xharness/Jenkins/TestTasks/MacExecuteTask.cs | Switches to concrete crash reporter factory type and adds nullability annotations/suppressions. |
| tests/xharness/Jenkins/TestTasks/MSBuildTask.cs | Publicizes type, adds nullability checks/suppressions, and aligns env var dictionary value type. |
| tests/xharness/Jenkins/TestTasks/MSBuild.cs | Makes tool arg inputs nullable and returns nullable known-failure result. |
| tests/xharness/Jenkins/TestTasks/ITestTaskExtensions.cs | Updates extensions to work with concrete TestTask instead of removed interface. |
| tests/xharness/Jenkins/TestTasks/ITestTask.cs | Removed (interface eliminated). |
| tests/xharness/Jenkins/TestTasks/IRunXITask.cs | Removed (interface eliminated). |
| tests/xharness/Jenkins/TestTasks/IRunTestTask.cs | Removed (interface eliminated). |
| tests/xharness/Jenkins/TestTasks/IRunSimulatorTask.cs | Removed (interface eliminated). |
| tests/xharness/Jenkins/TestTasks/IRunDeviceTask.cs | Removed (interface eliminated). |
| tests/xharness/Jenkins/TestTasks/IBuildToolTask.cs | Removed (interface eliminated). |
| tests/xharness/Jenkins/TestTasks/DotNetTestTask.cs | Null-suppression for working directory/dotnet path usage. |
| tests/xharness/Jenkins/TestTasks/DotNetBuild.cs | Aligns override signature with nullable tool-arg parameters. |
| tests/xharness/Jenkins/TestTasks/BuildToolTask.cs | Removes IBuildToolTask and makes build log nullable. |
| tests/xharness/Jenkins/TestTasks/BuildTool.cs | Makes key properties non-null default/nullable where appropriate. |
| tests/xharness/Jenkins/TestTasks/BuildProjectTask.cs | Cast-based access and nullable solution path. |
| tests/xharness/Jenkins/TestTasks/AppleTestTask.cs | Switches base class and replaces IHarness with concrete Harness. |
| tests/xharness/Jenkins/TestServer.cs | Improves null-safety around request URL parsing and task list typing. |
| tests/xharness/Jenkins/TestSelector.cs | Publicizes TestSelection and shifts to concrete Harness usage. |
| tests/xharness/Jenkins/TestData.cs | Nullable fields for optional variation metadata. |
| tests/xharness/Jenkins/RunSimulatorTasksFactory.cs | Candidate typing fix for simulator devices. |
| tests/xharness/Jenkins/Reports/MarkdownReportWriter.cs | Updates report writer inputs to TestTask concrete type. |
| tests/xharness/Jenkins/Reports/IReportWriter.cs | Updates interface to accept IList<TestTask>. |
| tests/xharness/Jenkins/Reports/HtmlReportWriter.cs | Updates report writer inputs to TestTask concrete type and nullable locals. |
| tests/xharness/Jenkins/MacTaskTestsFactory.cs | Switches to concrete crash reporter factory type. |
| tests/xharness/Jenkins/JenkinsDeviceLoader.cs | Publicizes device loader type. |
| tests/xharness/Jenkins/Jenkins.cs | Publicizes Jenkins class, switches to concrete harness/simulator loader types, and updates task list typing. |
| tests/xharness/IHarness.cs | Removed (interface eliminated). |
| tests/xharness/IAppBundleInformationParserExtensions.cs | Narrows _appBundleLocator parameter type and updates nullability. |
| tests/xharness/Harness.cs | Enables nullable, removes IHarness interface, and updates env var/path handling + null-suppression. |
| tests/xharness/GitHub.cs | Switches from IHarness to concrete Harness and updates null-suppression. |
| tests/xharness/DeviceLogCapturerFactory.cs | Removes factory interface and makes device name nullable. |
| tests/xharness/CrashSnapshotReporterFactory.cs | Removes factory interface and makes device name nullable. |
| tests/xharness/AppRunner.cs | Updates dependencies to concrete factory types and adds many nullability changes. |
| tests/xharness/AppBundleLocator.cs | Makes LocateAppBundle nullable and updates property-inspection helper signatures. |
| tests/xharness/.vscode/tasks.json | Removed (editor config cleanup). |
| tests/xharness/.vscode/launch.json | Removed (editor config cleanup). |
Comments suppressed due to low confidence (1)
tests/xharness/TestPlatformExtensions.cs:44
ToPlatformNamereturns null forNone,All, and any future/unknown values. Downstream code uses this value for MSBuild property substitution; returning null here can lead to silent misconfiguration. Prefer returning a non-null string for all supported values and throwing for invalid flag combinations (likeAll) so errors are caught early.
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #a0f5bb6] Build passed (Build packages) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #a0f5bb6] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ 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 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #a0f5bb6] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #a0f5bb6] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Also remove the tests, they're not running and have bitrotted.