Skip to content

Enable COM runtime tests in CI PR gates#1734

Draft
jevansaks wants to merge 1 commit into
mainfrom
user/jevansa/enable-com-runtime-tests
Draft

Enable COM runtime tests in CI PR gates#1734
jevansaks wants to merge 1 commit into
mainfrom
user/jevansa/enable-com-runtime-tests

Conversation

@jevansaks

Copy link
Copy Markdown
Member

Summary

Enable COM runtime tests in CI PR gates by removing the RequiresHardware trait from tests that don't actually need GPU/D3D hardware.

What changed

11 tests now run in CI (previously all 14 were excluded):

Test Project Change
RemotableInterface GenerationSandbox.Tests Removed trait + graceful skip if Shell unavailable
CanCallIDispatchOnlyMethods GenerationSandbox.Tests Removed trait + graceful skip if Shell unavailable
IWbemServices_GetObject_Works GenerationSandbox.Tests Removed trait + graceful skip if WMI namespace unavailable
CanCallINetFwMgrApis GenerationSandbox.Tests Removed trait
IShellItem_BindToHandler_IStream_ReadWorks GenerationSandbox.Tests Removed trait
IShellItem_BindToHandler_GenericOverload GenerationSandbox.Tests Removed trait
SHCreateItemFromParsingName_GenericOverload GenerationSandbox.Tests Removed trait
IWbemServices_GetObject_Works GenerationSandbox.BuildTask.Tests Removed trait + graceful skip
CanCallINetFwMgrApis GenerationSandbox.BuildTask.Tests Removed trait + graceful skip
CanCallPnPAPIs GenerationSandbox.BuildTask.Tests Removed trait
IShellItem_BindToHandler_IStream_ReadWorks GenerationSandbox.BuildTask.Tests Removed trait

3 tests remain excluded (genuinely need GPU):

Test Project Reason
ReturnValueMarshalsCorrectly GenerationSandbox.Tests D2D render target creation
ReturnValueMarshalsCorrectly GenerationSandbox.BuildTask.Tests D2D render target creation
ReturnValueMarshalsCorrectly GenerationSandbox.Unmarshalled.Tests D2D render target creation

Why

The RequiresHardware filter was blanket-excluding all COM runtime tests from CI. This meant PR gates only verified that generated code compiles but never exercised actual COM interop through .NET runtime. Tests that might fail on headless VMs (Shell, WMI) now use Assert.Skip for graceful degradation instead of being excluded entirely.

No CI workflow changes needed

The existing test-fast-windows job filter (TestCategory!=HighMemory&TestCategory!=RequiresHardware) automatically picks up these tests now that the trait is removed.

Remove RequiresHardware trait from COM runtime tests that don't need
GPU/D3D hardware. Only the ReturnValueMarshalsCorrectly tests (which
create D2D render targets) retain the RequiresHardware exclusion.

Tests that depend on Explorer shell or WMI namespaces that may not be
available on headless CI VMs now gracefully skip via Assert.Skip when
the required COM objects are unavailable, rather than being excluded
entirely.

This ensures PR gates exercise actual COM interop code paths through
.NET runtime, not just verify that the generated code compiles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jevansaks jevansaks force-pushed the user/jevansa/enable-com-runtime-tests branch from b90ba0e to 4950ec6 Compare June 16, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant