Run COM runtime tests on GitHub Actions windows-latest#1734
Merged
Conversation
b90ba0e to
4950ec6
Compare
The COM/Direct2D/WMI/Shell runtime tests were tagged RequiresHardware (formerly FailsInCloudTest) and excluded from ALL CI, so we only ever verified that the generated projection compiled -- never that it actually works at runtime through the .NET / source-generated COM marshalers. The original failures were on the locked-down Azure DevOps 1ES build pool (microbuild agents) which lack an interactive desktop, GPU, and some WMI providers. GitHub-hosted windows-latest runners do NOT have those limitations: they run an interactive session, Defender's WMI provider, the firewall service, and can drive Direct2D via the WARP software rasterizer. Changes: - Add a gating `test-hardware-windows` job that runs the RequiresHardware tests on windows-latest so the real runtime code paths are exercised in PRs. Wire it into the `validate` required check. - Keep the RequiresHardware trait so the Azure DevOps 1ES pool (dotnet-test-cloud.ps1) continues to exclude these tests. - Direct2D ReturnValueMarshalsCorrectly tests now create a D2D1_RENDER_TARGET_TYPE_SOFTWARE (WARP) render target so they exercise the same render-target creation + HWND marshaling without a hardware GPU. - No graceful Assert.Skip fallbacks: if a test regresses or the environment changes, the job fails loudly rather than silently skipping. - Fix misleading trait comments (including a copy-paste "WMI" comment on a Shell-only test) to document the real ADO-1ES-vs-GitHub rationale. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4950ec6 to
5d4fdc5
Compare
manodasanW
approved these changes
Jun 17, 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
The COM/Direct2D/WMI/Shell runtime tests were tagged
RequiresHardware(formerlyFailsInCloudTest) and excluded from all CI. That meant we only ever verified that the generated projection compiled — never that it actually works at runtime through the .NET / source-generated COM marshalers. This PR makes those tests run on GitHub Actions.Root cause (why they were excluded)
Archeology shows the original failures were on the locked-down Azure DevOps 1ES build pool (microbuild agents) — first disabled in 2024 (
7e10c766"Disable test that fails on microbuild agents"), then carried forward defensively. Those agents lack:D2D1_RENDER_TARGET_TYPE_DEFAULT)GitHub-hosted
windows-latestrunners do not have those limitations. Empirically, all 14 tests run and pass there (Skipped: 0).Changes
test-hardware-windowsjob runs theRequiresHardwaretests onwindows-latestand is wired into the requiredvalidatecheck — so PRs now exercise the real runtime code paths.RequiresHardwaretrait so the Azure DevOps 1ES pool (dotnet-test-cloud.ps1) continues to exclude these tests (per maintainer guidance — it's fine for the DevDiv outer loop to keep skipping them).D2D1_RENDER_TARGET_TYPE_SOFTWARE) — same render-target creation + HWND marshaling code paths, no hardware GPU required.Assert.Skipfallbacks — if a test regresses or the environment changes, the job fails loudly instead of silently skipping. (This reverts the earlier fallback approach.)// WMI APIs don't work in cloud VMs.comment onCanCallIDispatchOnlyMethods(a Shell-only test, not WMI).Tests now exercised in CI
ReturnValueMarshalsCorrectly×3IWbemServices_GetObject_Works×2CanCallINetFwMgrApis×2CanCallIDispatchOnlyMethodsRemotableInterfaceCanCallPnPAPIsIShellItem_BindToHandler_IStream_ReadWorks×2IShellItem_BindToHandler_GenericOverload,SHCreateItemFromParsingName_GenericOverloadValidation
windows-latest(Skipped: 0).CsWin32 unofficial#25100) continues to exclude them via the existingRequiresHardwarefilter, so the official build stays green.