Skip to content

[cdac] Run cDAC unit + DataGenerator tests in runtime-diagnostics pipeline#129241

Closed
max-charlamb wants to merge 1 commit into
dotnet:mainfrom
max-charlamb:cdac-datagenerator-tests-ci
Closed

[cdac] Run cDAC unit + DataGenerator tests in runtime-diagnostics pipeline#129241
max-charlamb wants to merge 1 commit into
dotnet:mainfrom
max-charlamb:cdac-datagenerator-tests-ci

Conversation

@max-charlamb

Copy link
Copy Markdown
Member

Note

This PR was prepared with assistance from GitHub Copilot CLI.

Summary

The cDAC has four test projects under src/native/managed/cdac/tests/:

Project Where it ran (before)
UnitTests/Microsoft.Diagnostics.DataContractReader.Tests.csproj runtime.yml CLR_Tools_Tests (main CI)
DumpTests/...DumpTests.csproj runtime-diagnostics.yml
StressTests/...StressTests.csproj runtime-diagnostics.yml
DataGenerator/...DataGeneratorTests.csproj not built or executed in CI

This PR puts the cDAC managed-side test projects under the cDAC-focused pipeline.

Changes

  1. eng/Subsets.props -- DataGeneratorTests added to the existing tools.cdactests subset (no new subset). One subset now builds both managed-side cDAC test projects.

  2. eng/pipelines/runtime-diagnostics.yml -- new CdacUnitTests stage that runs tools.cdactests on linux_x64 Checked with -test. Independent of the dump/stress legs (no native runtime needed). Publishes xunit results. Now the cDAC unit tests + DataGenerator tests live in the cDAC-focused pipeline next to the dump/stress tests.

  3. src/native/managed/cdac/tests/DataGenerator/TestTarget.cs -- override the new Target.ReadNInt abstract method (added in [cDAC] Implement delegate inspection DacDbi APIs #128784) on the test-only TestTarget mock so the DataGeneratorTests project compiles. Mirrors the existing ReadNUInt override (new TargetNInt(PointerSize == 8 ? Read<long> : Read<int>)).

Note

runtime.yml's existing CLR_Tools_Tests leg still runs the cDAC UnitTests via the same tools.cdactests subset, so coverage is unchanged there -- this PR is purely additive (adds DataGen coverage, and pulls everything into the cDAC pipeline for easier triage).

…peline

Three pieces:

1. eng/Subsets.props: wire the DataGeneratorTests project
   (cdac/tests/DataGenerator/) under the existing tools.cdactests subset
   alongside the existing UnitTests project. No new subset -- one subset
   builds both managed-side cDAC test projects.

2. eng/pipelines/runtime-diagnostics.yml: new CdacUnitTests stage that
   runs tools.cdactests on linux_x64 Checked with -test. Independent of
   the dump/stress legs (no native runtime needed). Publishes xunit
   results. Now the cDAC unit tests + DataGenerator tests live in the
   cDAC-focused pipeline next to the dump/stress tests.

3. src/native/managed/cdac/tests/DataGenerator/TestTarget.cs: override
   the new Target.ReadNInt abstract method (added in e9e3c8d,
   dotnet#128784) so the DataGeneratorTests project compiles. Mirrors the
   existing ReadNUInt override.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 10, 2026 15:21

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

Adds cDAC managed-side test coverage to the runtime-diagnostics pipeline by wiring the DataGenerator test project into an existing subset and introducing a dedicated pipeline stage to execute the subset on linux_x64 (Checked). Also updates the DataGenerator test-only TestTarget mock to implement the newly-required Target.ReadNInt override so the test project compiles.

Changes:

  • Add Microsoft.Diagnostics.DataContractReader.DataGeneratorTests.csproj to the existing tools.cdactests subset.
  • Add a new CdacUnitTests stage to runtime-diagnostics.yml to run tools.cdactests on linux_x64 Checked with -test and publish xUnit results.
  • Implement TestTarget.ReadNInt in the DataGenerator test mock target.

Reviewed changes

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

File Description
src/native/managed/cdac/tests/DataGenerator/TestTarget.cs Adds ReadNInt override to keep DataGenerator tests building after the Target abstraction gained the new abstract method.
eng/Subsets.props Extends tools.cdactests to include the DataGenerator test project in addition to the existing cDAC unit test project.
eng/pipelines/runtime-diagnostics.yml Introduces a new independent CdacUnitTests stage that runs the tools.cdactests subset and publishes xUnit test results.

Comment thread eng/Subsets.props
Comment on lines 532 to 535
<ItemGroup Condition="$(_subset.Contains('+tools.cdactests+'))">
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\UnitTests\Microsoft.Diagnostics.DataContractReader.Tests.csproj" Test="true" Category="tools"/>
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\DataGenerator\Microsoft.Diagnostics.DataContractReader.DataGeneratorTests.csproj" Test="true" Category="tools"/>
</ItemGroup>
@max-charlamb

Copy link
Copy Markdown
Member Author

Superseded by #129244 -- consolidated into a single PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants