Skip to content

Fix GPG and central package management tests locally and on Helix - #17524

Open
akoeplinger wants to merge 2 commits into
dotnet:mainfrom
akoeplinger:akoeplinger/fix-local-test-failures
Open

akoeplinger wants to merge 2 commits into
dotnet:mainfrom
akoeplinger:akoeplinger/fix-local-test-failures

Conversation

@akoeplinger

Copy link
Copy Markdown
Member

SignTool's DEB and RPM integrity tests assumed GPG was unavailable on every non-Linux platform. Probe GPG availability with Process.Run while preserving the production Windows verification bypass.

CentralPackageManagementTests was failing locally because the repository-wide SwixBuild PackageVersion overlapped with an implicit reference in the Arcade SDK. Moving version 1.1.922 into the Workloads test project as a project-local PackageVersion fixes that failure while preserving the test toolset dependency.

This failure escaped Helix coverage because the CPM guard silently returned when it could not find a repository checkout. Copy Directory.Packages.props and SDK tools props/targets into the test payload and always check those inputs, so Helix now exercises the guard too. Fail explicitly for missing, empty, or unreadable required inputs instead of silently passing.

Validation: SignTool suite passed (189 passed, 12 skipped); CPM guard passed; Workloads tests passed on macOS (2 passed, 25 skipped), resolving SwixBuild 1.1.922. An isolated payload outside the checkout passed and correctly failed with an injected conflict or missing package file. Windows SWIX integration and a live Helix run were not performed.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Copilot-Session: 9f27e529-3921-42bd-9a9b-4932badf6b59

SignTool's DEB and RPM integrity tests assumed GPG was unavailable on every non-Linux platform. Probe GPG availability with Process.Run while preserving the production Windows verification bypass.

CentralPackageManagementTests was failing locally because the repository-wide SwixBuild PackageVersion overlapped with an implicit reference in the Arcade SDK. Moving version 1.1.922 into the Workloads test project as a project-local PackageVersion fixes that failure while preserving the test toolset dependency.

This failure escaped Helix coverage because the CPM guard silently returned when it could not find a repository checkout. Copy Directory.Packages.props and SDK tools props/targets into the test payload and always check those inputs, so Helix now exercises the guard too. Fail explicitly for missing, empty, or unreadable required inputs instead of silently passing.

Validation: SignTool suite passed (189 passed, 12 skipped); CPM guard passed; Workloads tests passed on macOS (2 passed, 25 skipped), resolving SwixBuild 1.1.922. An isolated payload outside the checkout passed and correctly failed with an injected conflict or missing package file. Windows SWIX integration and a live Helix run were not performed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9f27e529-3921-42bd-9a9b-4932badf6b59
Copilot AI lite review requested due to automatic review settings September 9, 2026 14:10

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.

🟡 Changes recommended

The new GPG probe uses Process.Run(...), which is not defined in the repo/BCL and will fail to compile without adjustment.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates Arcade’s test suites to better reflect real-world environments (local and Helix), particularly around GPG-based package integrity verification and Central Package Management (CPM) guard coverage.

Changes:

  • Probe GPG availability at runtime to decide whether DEB/RPM signature verification can run (while preserving the Windows bypass).
  • Move the SwixBuild version pin from repo-wide CPM into the Workloads test project to avoid CPM/implicit-reference conflicts.
  • Make CPM guard tests runnable on Helix by shipping required inputs in the test payload and asserting the inputs are present/non-empty.
File summaries
File Description
src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs Add GPG availability probing and adjust expected signing behavior accordingly.
src/Microsoft.DotNet.Build.Tasks.Workloads.Tests/Microsoft.DotNet.Build.Tasks.Workloads.Tests.csproj Pin SwixBuild version locally in the test project.
src/Microsoft.DotNet.Arcade.Sdk.Tests/Microsoft.DotNet.Arcade.Sdk.Tests.csproj Include CPM guard inputs (Directory.Packages.props + SDK tools props/targets) in test output for Helix.
src/Microsoft.DotNet.Arcade.Sdk.Tests/CentralPackageManagementTests.cs Run CPM guard using shipped inputs and fail when required inputs are missing/empty.
Directory.Packages.props Remove repo-wide SwixBuild PackageVersion entry.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread src/Microsoft.DotNet.SignTool.Tests/SignToolTests.cs
@akoeplinger
akoeplinger enabled auto-merge (squash) September 10, 2026 08:53
<PackageReference Include="Microsoft.NET.Sdk.WorkloadManifestReader" />
<PackageReference Include="Microsoft.WixToolset.Dtf.WindowsInstaller" />
<PackageReference Include="Microsoft.WixToolset.Dtf.WindowsInstaller.Package" />
<!-- Pin the SWIX toolset used by workload tests independently of the Arcade SDK. -->

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.

If Arcade can move forward to the 1.1.922 build, the workload tests can start using the same version I think.

Copilot AI review requested due to automatic review settings September 10, 2026 16:20

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.

🟢 Approval recommended

The changes are narrowly scoped to tests and package versioning inputs, and the updated logic aligns with the stated goal of exercising the checks both locally and on Helix.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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.

3 participants