Skip to content

[cdac] Run DataGenerator tests in CI alongside cDAC unit tests#129238

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

[cdac] Run DataGenerator tests in CI alongside cDAC unit tests#129238
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 repo has four test projects under src/native/managed/cdac/tests/:

Project Subset In CI today
UnitTests/Microsoft.Diagnostics.DataContractReader.Tests.csproj tools.cdactests yes (runtime.yml CLR_Tools_Tests)
DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj tools.cdacdumptests yes (runtime-diagnostics.yml)
StressTests/Microsoft.Diagnostics.DataContractReader.StressTests.csproj tools.cdacstresstests yes (runtime-diagnostics.yml)
DataGenerator/Microsoft.Diagnostics.DataContractReader.DataGeneratorTests.csproj (none) no

This PR:

  1. Adds a tools.cdacdatageneratortests subset (mirrors the existing tools.cdac<X>tests pattern in Subsets.props).
  2. Includes it in the existing CLR_Tools_Tests CI leg in runtime.yml so the DataGenerator tests run alongside the cDAC unit tests on linux_x64 Checked whenever coreclr / illink / tools.cdac paths change.

No new CI job; tests piggyback on the existing leg.

Files changed

  • eng/Subsets.props — new tools.cdacdatageneratortests subset + added to AllSubsetsExpansion.
  • eng/pipelines/runtime.yml — appended +tools.cdacdatageneratortests to the CLR_Tools_Tests buildArgs.

Copilot AI review requested due to automatic review settings June 10, 2026 15:09

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 extends the dotnet/runtime build subset infrastructure to include the cDAC DataGenerator test project, and wires that new subset into the existing CLR_Tools_Tests CI leg so these tests run in the same lane as the existing cDAC unit tests.

Changes:

  • Add a new build subset tools.cdacdatageneratortests that builds/runs the DataGenerator test project.
  • Include tools.cdacdatageneratortests in AllSubsetsExpansion.
  • Update CLR_Tools_Tests build args in eng/pipelines/runtime.yml to run the new subset in CI.

Reviewed changes

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

File Description
eng/Subsets.props Adds the tools.cdacdatageneratortests subset and a ProjectToBuild entry for the DataGenerator tests.
eng/pipelines/runtime.yml Extends the CLR_Tools_Tests CI buildArgs to include the new subset.

Comment thread eng/Subsets.props Outdated
Comment on lines +544 to +546
<ItemGroup Condition="$(_subset.Contains('+tools.cdacdatageneratortests+'))">
<ProjectToBuild Include="$(SharedNativeRoot)managed\cdac\tests\DataGenerator\Microsoft.Diagnostics.DataContractReader.DataGeneratorTests.csproj" Test="true" Category="tools"/>
</ItemGroup>
@max-charlamb max-charlamb force-pushed the cdac-datagenerator-tests-ci branch from aeab1b4 to c657933 Compare June 10, 2026 15:16
…ests subset

The DataGeneratorTests project (cdac/tests/DataGenerator/) had no
subset and was not built or executed in CI. Add it to the existing
tools.cdactests subset (which already builds the cDAC UnitTests
project) so the DataGenerator tests run on the existing CLR_Tools_Tests
CI leg with no separate subset or extra wiring elsewhere.

Also override the new Target.ReadNInt abstract method (added in
e9e3c8d) on the test-only TestTarget mock so the project compiles.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 10, 2026 15:18
@max-charlamb max-charlamb force-pushed the cdac-datagenerator-tests-ci branch from c657933 to 70960fb Compare June 10, 2026 15:18
@max-charlamb

Copy link
Copy Markdown
Member Author

Closing -- per discussion, cDAC unit tests + DataGenerator tests should run inside the runtime-diagnostics pipeline rather than main runtime.yml. Rerouting in #129237 or a follow-up.

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 2 out of 2 changed files in this pull request and generated 2 comments.

Comment on lines +202 to +203
public override TargetNInt ReadNInt(ulong address)
=> new TargetNInt(PointerSize == 8 ? Read<long>(address) : Read<int>(address));
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>
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