Skip to content

Commit ef207bf

Browse files
Max CharlambCopilot
andcommitted
Add cDAC-only CI test legs for Windows and Linux
- SOSRunner sends 'runtimes --forceusecdac' to dotnet-dump when SOS_TEST_CDAC is set, enabling cDAC-only mode for dump tests. - build.yml gains a useCdac parameter that passes -useCdac to the build script, setting SOS_TEST_CDAC=true. - Add Windows_cDAC (build+test) and Ubuntu_22_04_cDAC (test-only) CI legs running Release x64 with cDAC-only mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f73c870 commit ef207bf

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

diagnostics.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,17 @@ extends:
9494
architecture: arm64
9595
artifactUploadPath: bin/Windows_NT.arm64.Release
9696

97+
- ${{ if ne(parameters.buildOnly, true) }}:
98+
- template: /eng/pipelines/build.yml
99+
parameters:
100+
jobTemplate: ${{ variables.jobTemplate }}
101+
name: Windows_cDAC
102+
osGroup: Windows_NT
103+
useCdac: true
104+
buildConfigs:
105+
- configuration: Release
106+
architecture: x64
107+
97108
- template: /eng/pipelines/build.yml
98109
parameters:
99110
jobTemplate: ${{ variables.jobTemplate }}
@@ -234,6 +245,19 @@ extends:
234245
- configuration: Debug
235246
architecture: x64
236247

248+
- template: /eng/pipelines/build.yml
249+
parameters:
250+
jobTemplate: ${{ variables.jobTemplate }}
251+
name: Ubuntu_22_04_cDAC
252+
osGroup: Linux
253+
container: test_ubuntu_22_04
254+
dependsOn: Linux
255+
testOnly: true
256+
useCdac: true
257+
buildConfigs:
258+
- configuration: Release
259+
architecture: x64
260+
237261
- template: /eng/pipelines/build.yml
238262
parameters:
239263
jobTemplate: ${{ variables.jobTemplate }}

eng/pipelines/build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ parameters:
6060
type: boolean
6161
default: false
6262

63+
# Optional: run tests with cDAC-only mode
64+
- name: useCdac
65+
type: boolean
66+
default: false
67+
6368
# Optional: architecture cross build if true
6469
- name: crossBuild
6570
type: boolean
@@ -144,6 +149,9 @@ jobs:
144149
- ${{ if eq(parameters.testOnly, 'true') }}:
145150
- _TestArgs: '-test -skipnative'
146151

152+
- ${{ if eq(parameters.useCdac, 'true') }}:
153+
- _TestArgs: '-test -skipnative -useCdac'
154+
147155
- ${{ if or(eq(parameters.buildOnly, 'true'), eq(parameters.isCodeQLRun, 'true')) }}:
148156
- _TestArgs: ''
149157

src/tests/SOS.UnitTests/SOSRunner.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,10 @@ public static async Task<SOSRunner> StartDebugger(TestInformation information, D
685685
&& !config.IsPrivateBuildTesting()
686686
&& !config.IsNightlyBuild();
687687
initialCommands.Add($"runtimes --DacSignatureVerification:{(shouldVerifyDacSignature ? "true" : "false")}");
688+
if (config.TestCDAC)
689+
{
690+
initialCommands.Add("runtimes --forceusecdac");
691+
}
688692
arguments.Append(debuggerPath);
689693
arguments.Append(@" analyze %DUMP_NAME%");
690694
debuggerPath = config.DotNetDumpHost();

0 commit comments

Comments
 (0)