Skip to content

Run managed-only unit tests on Helix - #6062

Merged
max-charlamb merged 4 commits into
dotnet:mainfrom
max-charlamb:convert-tests-to-helix
Sep 25, 2026
Merged

max-charlamb merged 4 commits into
dotnet:mainfrom
max-charlamb:convert-tests-to-helix

Conversation

@max-charlamb

Copy link
Copy Markdown
Member

Summary

  • Run ExtensionCommands, Monitoring, FileFormats, and SymbolStore unit tests once per pipeline on Linux x64 Debug Helix.
  • Discover execution modes from project metadata and share payload staging, launchers, and submission targets.
  • Skip Helix suites in legacy Azure Pipelines test jobs while preserving local execution and existing SOS Helix coverage.
  • Leave EventPipe and DbgShim on their existing execution paths.

Validation

  • Verified discovery selects exactly the four managed-only projects and selects only SOS for the platform Helix matrix.
  • Verified RunTests skips all five Helix projects with SkipHelixTests=true, while local execution remains enabled and EventPipe/DbgShim remain enabled in legacy CI.
  • Verified default submission selects the test-framework runtime and launcher.
  • Checked the diff for whitespace errors.

CI validation before merge

  • Compare reported test identities and counts for each migrated suite with the previous Linux x64 Debug run, including skipped tests.
  • Confirm each migrated suite reports exactly once from managed-only Helix and is absent from all legacy test jobs.
  • Confirm the existing SOS Helix matrix remains intact.

Route four managed-only suites to a single Linux x64 Debug Helix leg. Discover execution modes from test projects, retain SOS custom submission, and skip Helix suites in legacy CI jobs.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Copilot AI lite review requested due to automatic review settings September 23, 2026 19:59
@max-charlamb
max-charlamb requested a review from a team as a code owner September 23, 2026 19:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Resolve the runtime-filter failure and disable multilevel runtime lookup in both launchers.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Adds metadata-driven Helix execution for managed unit tests while preserving SOS coverage and legacy CI paths.

Changes:

  • Adds execution-mode discovery, payload staging, and cross-platform launchers.
  • Updates Helix and legacy pipeline routing.
  • Documents test execution modes.
File Summary
src/​tests/​SOS.Tests/​SOS.Tests.csproj Preserves SOS Helix routing.
src/​tests/​Microsoft.SymbolStore.UnitTests/​Microsoft.SymbolStore.UnitTests.csproj Enables managed Helix execution.
src/​tests/​Microsoft.FileFormats.UnitTests/​Microsoft.FileFormats.UnitTests.csproj Enables managed Helix execution.
src/​tests/​Microsoft.Diagnostics.Monitoring/​Microsoft.Diagnostics.Monitoring.UnitTests.csproj Enables managed Helix execution.
src/​tests/​Microsoft.Diagnostics.ExtensionCommands.UnitTests/​Microsoft.Diagnostics.ExtensionCommands.UnitTests.csproj Enables managed Helix execution.
src/​tests/​HelixPayload.targets Adds shared discovery and skip logic.
src/​tests/​Helix/​run-tests.sh Adds Unix Helix launcher; multilevel lookup isolation requires changes.
src/​tests/​Helix/​run-tests.cmd Adds Windows Helix launcher; multilevel lookup isolation requires changes.
src/​tests/​dirs.proj Discovers and submits configured projects.
src/​tests/​Directory.Build.targets Imports shared Helix configuration.
src/​tests/​Directory.Build.props Defines execution defaults.
src/​tests/​DefaultSendToHelix.targets Stages and submits payloads; runtime filtering fails for private-build and servicing configurations.
README.md Documents test execution modes.
eng/​pipelines/​tests-helix.yml Updates Helix pipeline execution.
eng/​pipelines/​build.yml Skips migrated suites in legacy jobs.
diagnostics.yml Adds managed-only and SOS Helix matrices.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/tests/DefaultSendToHelix.targets Resolved
Max Charlamb and others added 3 commits September 24, 2026 15:50
Gather project-owned work items through the dedicated Helix sender. Share managed payload helpers, select managed suites by linux-x64 RID, and consolidate runtime requirements. Keep SOS staging and launchers independent.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Serialize candidate project restores to avoid conflicting writes to shared dependency outputs. Select the managed launcher by TargetOS while preserving existing project opt-ins.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
Use Helix-recognized .testResults.xml filenames for managed and SOS tests, and stop emitting SOS TRX reports. Rename the launchers to runtests.cmd and runtests.sh and update payload references.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
@max-charlamb
max-charlamb merged commit 4e7121a into dotnet:main Sep 25, 2026
23 checks passed
@max-charlamb
max-charlamb deleted the convert-tests-to-helix branch September 25, 2026 16:04
max-charlamb added a commit that referenced this pull request Sep 27, 2026
## Summary

Follow up on #6062 by moving six more suites to the existing
cross-platform Helix jobs:

- EventPipe.UnitTests
- DotnetGCDump.UnitTests
- Microsoft.Diagnostics.NETCore.Client.UnitTests
- Microsoft.Diagnostics.Monitoring.EventPipe.UnitTests
- DotnetCounters.UnitTests
- DotnetTrace.UnitTests

All six opt out of legacy CI execution while remaining runnable locally.
The existing platform matrix is unchanged, including macOS x64 only in
non-PR builds.

## Payload implementation

- Reuse the managed launcher for EventPipe and DotnetGCDump.
- Separate managed payload staging from work-item creation so
CommonTestRunner can extend the payload before runtime metadata is
finalized.
- Discover every CommonTestRunner debuggee using the same project glob
as the build and include its prebuilt outputs for each entry in
RuntimeTestVersions. Suites can use multiple debuggees without
maintaining per-suite packaging lists.
- Stage the dotnet-trace tool for its child-process tests.
- Replace build-machine configuration with relative artifact paths, use
the launcher's DOTNET_ROOT, and require sdk.prebuilt execution. Missing
prebuilt inputs fail payload creation; workers do not build or restore
tracees.
- Request the test-host and tracee runtimes through existing Helix
runtime provisioning. Preserve the .NET 8/9/10/11 tracee matrix within
each suite work item.
- Update the execution documentation.

## Validation

- Targeted builds of all six suites succeeded.
- Relocated Windows payload execution with runtime-only layouts and an
empty NuGet cache matched baseline results: EventPipe 8 passed/1
skipped; GCDump 1 passed; the four CommonTestRunner suites 397 passed/59
skipped across 456 cases. The pinned Helix reporter discovered all
reported cases. DotnetTrace display-name comparisons normalize only the
current-process ID.
- After switching to all-debuggee discovery, local-only verification
fixtures passed across seven RIDs and Debug/Release (84 suite payloads),
including 896 shared tracee configurations and explicit failure when an
otherwise unused StackTracee input is missing.
- A real Counters payload includes all four CommonTestRunner debuggees
for all four frameworks, with staged required files matching their
prebuilt hashes.
- Verified legacy-CI exclusion and local execution remain correctly
gated across Windows, Linux, and macOS.

The local verification fixtures are not included in this PR.

Live cross-platform Helix execution and Azure Pipelines result parity
remain to be confirmed by CI. DebugServices, DbgShim, and legacy
SOS.UnitTests are not migrated in this PR.

---------

Co-authored-by: Max Charlamb <[email protected]>
Co-authored-by: Copilot <[email protected]>
Copilot-Session: 90d32376-768b-4f8c-a982-54247c372cf3
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants