Skip to content

Rename runner-agnostic SDKCustomXUnit* Helix infrastructure to a runner-neutral name#55099

Merged
Evangelink merged 2 commits into
mainfrom
dev/amauryleve/rename-sdkcustomxunit-helix-infra
Jul 2, 2026
Merged

Rename runner-agnostic SDKCustomXUnit* Helix infrastructure to a runner-neutral name#55099
Evangelink merged 2 commits into
mainfrom
dev/amauryleve/rename-sdkcustomxunit-helix-infra

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Fixes #55094

What

Renames the runner-agnostic Helix work-item pipeline from xUnit-specific names to runner-neutral ones. After the xUnit → MSTest/MTP migration, this infrastructure is no longer xUnit-specific (it already detects MTP projects via IsMTPProject/GetIsMTPProject and handles TRX reporting), so the names were misleading. This is a naming/clarity cleanup only — no functional change intended.

Changes

Old New
test/xunit-runner/ test/test-runner/
XUnitRunner.targets / XUnitPublish.targets TestRunner.targets / TestPublish.targets
SDKCustomCreateXUnitWorkItemsWithTestExclusion (class + file + UsingTask) SDKCustomCreateTestWorkItemsWithTestExclusion
SDKCustomXUnitProject item, XUnitWorkItemTimeout, SDKCustomXUnit* props, targets Restore/Build/CreateSDKCustomXUnit*, task params XUnitProjects/XUnitArguments/XUnitWorkItems SDKCustomTest* / TestWorkItemTimeout / Test* equivalents
xunit comment references in AssemblyScheduler.cs, AwaitableProcess.cs runner-neutral wording

File/folder renames use git mv to preserve history. The compiled UsingTask TaskName=… declaration in TestRunner.targets was kept in sync with the renamed task class.

Left intentionally untouched:

  • Microsoft.DotNet.SdkCustomHelix.Sdk namespace (already runner-neutral).
  • eng/common/** (Arcade-vendored — out of scope per the issue).
  • The pre-existing $(SDKCustomTestArgument) singular-vs-plural mismatch (was $(SDKCustomXUnitArgument)), to avoid any behavior change.

Does the custom infra actually differ from Arcade's Helix SDK?

The issue asked to confirm this. Compared against Arcade main (src/Microsoft.DotNet.Helix/Sdk/): yes, it differs substantially — the fork is justified, Arcade has not caught up.

  • CreateXUnitWorkItemsWithTestExclusion.cs and AssemblyScheduler.cs do not exist in Arcade — they were never contributed upstream.
  • Sharding is SDK-only: Arcade has no AssemblyScheduler, no BaseMethodLimit/MethodLimitMultiplier partitioning, no per-shard --filter.
  • Arcade's MTP support is a different model: a separate MTPProject item type + CreateMTPWorkItems that emits dotnet exec --roll-forward Major --runtimeconfig … --depsfile … and deliberately omits --report-trx/--diagnostic/--ignore-exit-code 8. The SDK unifies MTP + VSTest under one item type and emits those itself, conditioned on build-time detection.
  • Different non-MTP engine: SDK uses VSTest (dotnet test + --blame-hang); Arcade uses legacy xunit.console.dll.
  • SDK-only extras: macOS codesign+entitlements, xUnit v3 apphost chmod +x, RID-qualified publish + CI pre-restore, AdditionalPayloadDir, DOTNET_SDK_TEST_EXECUTION_DIRECTORY / …MSBUILDSDKRESOLVER_FOLDER, .netfx identity suffix.

Validation

  • HelixTasks.csproj builds clean (0 warnings, 0 errors).
  • As noted in the issue, the rename touches a compiled MSBuild task whose UsingTask name must match the class name exactly, and is fully validated only by a green Helix run. Requesting infra-owner review.

Risk

Low-to-medium. A mistake would manifest silently as tests not being scheduled on Helix; needs a full green Helix run to confirm.

…names

Renames the runner-agnostic Helix work-item infrastructure from xUnit-specific
names to runner-neutral ones after the xUnit -> MSTest/MTP migration. No
functional change.

- test/xunit-runner/ -> test/test-runner/
- XUnitRunner.targets/XUnitPublish.targets -> TestRunner.targets/TestPublish.targets
- SDKCustomCreateXUnitWorkItemsWithTestExclusion -> SDKCustomCreateTestWorkItemsWithTestExclusion
  (class, file, and UsingTask declaration kept in sync)
- SDKCustomXUnitProject item -> SDKCustomTestProject; XUnitWorkItemTimeout -> TestWorkItemTimeout
  and related targets/properties/task parameters
- Updated xunit comment references in AssemblyScheduler.cs and AwaitableProcess.cs

Fixes #55094

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 14:04

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.

Pull request overview

This PR renames the SDK’s Helix “custom work item” MSBuild infrastructure from xUnit-specific identifiers to runner-neutral Test*/SDKCustomTest* naming, reflecting the post-migration reality where the pipeline handles multiple runner styles (including MTP/TRX).

Changes:

  • Renames Helix scheduling item/property/target names in test/UnitTests.proj and updates the imported runner targets path.
  • Renames the compiled MSBuild task SDKCustomCreate*WorkItemsWithTestExclusion and updates the UsingTask/parameter names accordingly.
  • Renames/updates runner/publish target files and tweaks wording in a couple of comments to be runner-neutral.
Show a summary per file
File Description
test/UnitTests.proj Updates Helix scheduling item/property names (SDKCustomTestProject, TestWorkItemTimeout) and imports the renamed runner targets.
test/test-runner/TestRunner.targets Renames properties/targets/tasks to SDKCustomTest* and updates the work item creation task invocation.
test/test-runner/TestPublish.targets Runner-neutral publish helper targets (PublishWithOutput, MTP/TRX detection query targets).
test/Microsoft.DotNet.HotReload.Test.Utilities/AwaitableProcess.cs Updates comment reference to the renamed work-item timeout property.
test/HelixTasks/SDKCustomCreateTestWorkItemsWithTestExclusion.cs Renames the MSBuild task class and its public MSBuild parameters/outputs to Test*.
test/HelixTasks/AssemblyScheduler.cs Updates comments to runner-neutral wording (with a couple of doc/comment fixes suggested).

Copilot's findings

Comments suppressed due to low confidence (1)

test/test-runner/TestRunner.targets:12

  • SDKCustomTestArguments is given a default value here, but the task invocation later passes TestArguments="$(SDKCustomTestArgument)" (singular). Currently SDKCustomTestArgument is not defined anywhere in the repo, so this default likely never takes effect and the property name may be a typo/leftover.
  • Files reviewed: 5/6 changed files
  • Comments generated: 3

Comment thread test/HelixTasks/AssemblyScheduler.cs Outdated
Comment thread test/HelixTasks/AssemblyScheduler.cs Outdated
Comment thread test/Microsoft.DotNet.HotReload.Test.Utilities/AwaitableProcess.cs Outdated
- Reword AssemblyScheduler XML doc to be runner-neutral (drop xUnit 'Fact'
  reference) and fix 'inherrited' typo
- Fix 'inheritting' typo and tighten grammar in the zero-method class comment
- Correct UnitTests.proj breadcrumb to the repo-relative 'test/UnitTests.proj' path

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@MichaelSimons MichaelSimons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I personally think SDKCustomCreateTestWorkItemsWithTestExclusion is unwieldy but that is an existing problem. CreateHelixTestWorkItems would be better IMO.

@Evangelink

Copy link
Copy Markdown
Member Author

I personally think SDKCustomCreateTestWorkItemsWithTestExclusion is unwieldy but that is an existing problem. CreateHelixTestWorkItems would be better IMO.

Merging as-is as PR is green and I'll do a follow-up.

@Evangelink Evangelink merged commit 78d8990 into main Jul 2, 2026
34 checks passed
@Evangelink Evangelink deleted the dev/amauryleve/rename-sdkcustomxunit-helix-infra branch July 2, 2026 17:51
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.

Rename runner-agnostic SDKCustomXUnit* Helix infrastructure to a runner-neutral name

3 participants