Skip to content

Run test project target frameworks in parallel#17161

Open
Evangelink wants to merge 6 commits into
dotnet:mainfrom
Evangelink:dev/amauryleve/parallelize-test-tfms
Open

Run test project target frameworks in parallel#17161
Evangelink wants to merge 6 commits into
dotnet:mainfrom
Evangelink:dev/amauryleve/parallelize-test-tfms

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

  • dispatch each target framework of a multi-targeted test project as a separate inner MSBuild build
  • enable parallel scheduling for those inner test builds
  • preserve generated test outputs for clean tracking
  • add a barrier-based regression test that fails when target frameworks run serially

Fixes #16581

Validation

  • Build.cmd -configuration Release -test

Dispatch each target framework through a parallel inner MSBuild invocation and add a barrier-based regression test.

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

Copilot-Session: ed12a139-3ab6-45cc-8f6f-e01edba82614
Copilot AI review requested due to automatic review settings July 21, 2026 14:29

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 updates Arcade SDK test infrastructure so that multi-targeted test projects run each target framework as a separate inner MSBuild invocation, enabling those TFM runs to be scheduled in parallel (addressing #16581).

Changes:

  • Switch Test/IntegrationTest to dispatch into _InnerRunTests or _OuterRunTests (per single-/multi-targeting) and run inner builds with BuildInParallel="true".
  • Add a functional regression test asset and xUnit test that deadlocks/fails if TFMs are executed serially.
  • Plumb FileWrites from inner test runs back to the outer target for correct output tracking.
Show a summary per file
File Description
src/Microsoft.DotNet.Arcade.Sdk/tools/Tests.targets Runs multi-target test TFMs as parallel inner MSBuild builds via _OuterRunTests and _InnerRunTests.
src/Microsoft.DotNet.Arcade.Sdk.Tests/testassets/ParallelTestTfms/ParallelTestTfms.proj New test asset project to validate parallel TFM execution.
src/Microsoft.DotNet.Arcade.Sdk.Tests/testassets/ParallelTestTfms/eng/Parallel/Parallel.targets Custom test runner targets implementing a barrier to fail when TFMs run serially.
src/Microsoft.DotNet.Arcade.Sdk.Tests/ParallelTestTfmsTests.cs New regression test that executes the asset and asserts success/expected artifacts.
src/Microsoft.DotNet.Arcade.Sdk.Tests/Microsoft.DotNet.Arcade.Sdk.Tests.csproj Copies Tests.targets into the specific test asset folder so the asset uses the PR’s version.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/5 changed files
  • Comments generated: 1

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

Copilot-Session: ed12a139-3ab6-45cc-8f6f-e01edba82614
Copilot AI review requested due to automatic review settings July 21, 2026 14:52

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's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 1

Comment thread src/Microsoft.DotNet.Arcade.Sdk/tools/Tests.targets
Copilot AI review requested due to automatic review settings July 21, 2026 16:11

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Use writable Helix paths for functional test fixtures, simplify inner-build item construction, and normalize barrier paths across platforms.

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

Copilot-Session: ed12a139-3ab6-45cc-8f6f-e01edba82614
Copilot AI review requested due to automatic review settings July 22, 2026 08:19

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's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 2

Treat empty Helix roots as unset and make the fake test runner produce and track its declared stdout artifact.

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

Copilot-Session: ed12a139-3ab6-45cc-8f6f-e01edba82614
Copilot AI review requested due to automatic review settings July 22, 2026 10:27

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's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new

@Evangelink
Evangelink enabled auto-merge July 22, 2026 11:00
Preserve architecture inference and validation within each parallel inner TFM test build.

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

Copilot-Session: ed12a139-3ab6-45cc-8f6f-e01edba82614
Copilot AI review requested due to automatic review settings July 23, 2026 08:28

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's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new

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.

Arcade test infra doesn't run TFMs of the same test project in parallel

3 participants