diff --git a/eng/pipelines/cdac/prepare-cdac-helix-steps.yml b/eng/pipelines/cdac/prepare-cdac-helix-steps.yml new file mode 100644 index 00000000000000..1661d4eb2d1198 --- /dev/null +++ b/eng/pipelines/cdac/prepare-cdac-helix-steps.yml @@ -0,0 +1,50 @@ +# prepare-cdac-helix-steps.yml — Shared steps for preparing cDAC dump test Helix payloads. +# +# Used by CdacDumpTests, CdacXPlatDumpGen, and CdacXPlatDumpTests stages in runtime-diagnostics.yml. +# Handles: building debuggees, preparing Helix payload, finding testhost and Helix queue. + +parameters: + buildDebuggees: true + skipDebuggeeCopy: false + +steps: +- ${{ if parameters.buildDebuggees }}: + - script: $(Build.SourcesDirectory)$(dir).dotnet$(dir)dotnet$(exeExt) msbuild + $(Build.SourcesDirectory)/src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj + /t:BuildDebuggeesOnly + /p:Configuration=$(_BuildConfig) + /p:TargetArchitecture=$(archType) + -bl:$(Build.SourcesDirectory)/artifacts/log/BuildDebuggees.binlog + displayName: 'Build Debuggees' + +- script: $(Build.SourcesDirectory)$(dir).dotnet$(dir)dotnet$(exeExt) build + $(Build.SourcesDirectory)/src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj + /p:PrepareHelixPayload=true + /p:SkipDebuggeeCopy=${{ parameters.skipDebuggeeCopy }} + /p:Configuration=$(_BuildConfig) + /p:HelixPayloadDir=$(Build.SourcesDirectory)/artifacts/helixPayload/cdac + /p:SkipDumpVersions=net10.0 + -bl:$(Build.SourcesDirectory)/artifacts/log/DumpTestPayload.binlog + displayName: 'Prepare Helix Payload' + +- pwsh: | + $testhostDir = Get-ChildItem -Directory -Path "$(Build.SourcesDirectory)/artifacts/bin/testhost/net*-$(osGroup)-*-$(archType)" | Select-Object -First 1 -ExpandProperty FullName + if (-not $testhostDir) { + Write-Error "No testhost directory found matching net*-$(osGroup)-*-$(archType) under artifacts/bin/testhost/" + exit 1 + } + Write-Host "TestHost directory: $testhostDir" + Write-Host "##vso[task.setvariable variable=TestHostPayloadDir]$testhostDir" + + $queue = switch ("$(osGroup)_$(archType)") { + "windows_x64" { "$(helix_windows_x64)" } + "windows_arm64" { "$(helix_windows_arm64)" } + "linux_x64" { "$(helix_linux_x64_oldest)" } + "linux_arm64" { "$(helix_linux_arm64_oldest)" } + "osx_x64" { "$(helix_macos_x64)" } + "osx_arm64" { "$(helix_macos_arm64)" } + default { Write-Error "Unsupported platform: $(osGroup)_$(archType)"; exit 1 } + } + Write-Host "Helix queue: $queue" + Write-Host "##vso[task.setvariable variable=CdacHelixQueue]$queue" + displayName: 'Find TestHost Directory and Helix Queue' diff --git a/eng/pipelines/runtime-diagnostics.yml b/eng/pipelines/runtime-diagnostics.yml index d5b1c9d10560d1..ceed70726cd270 100644 --- a/eng/pipelines/runtime-diagnostics.yml +++ b/eng/pipelines/runtime-diagnostics.yml @@ -11,7 +11,20 @@ parameters: default: - windows_x64 - linux_x64 - # - osx_x64 # Temporarily due to CI capacity constraints. Will re-enable once osx queues are more available. + - windows_arm64 + - linux_arm64 + # TODO: Re-enable osx once disk space issue is resolved. + # macOS full dumps are ~5.7GB each; with 8+ full-dump debuggees the Helix + # machines run out of disk space (~45GB total). See PR #124782 for details. + # - osx_arm64 + # - osx_x64 +- name: cdacDumpTestMode + displayName: cDAC Dump Test Mode + type: string + default: single-leg + values: + - single-leg + - xplat resources: repositories: @@ -23,6 +36,7 @@ resources: variables: - template: /eng/pipelines/common/variables.yml + - template: /eng/pipelines/helix-platforms.yml schedules: - cron: "30 2 * * *" @@ -181,86 +195,150 @@ extends: condition: failed() # - # cDAC Dump Creation — Build runtime, create crash dumps, publish dump artifacts + # cDAC Dump Tests — Build, generate dumps, and run tests on Helix (single-leg mode) # - - stage: DumpCreation - dependsOn: [] - jobs: - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: ${{ parameters.cdacDumpPlatforms }} - jobParameters: - buildArgs: -s clr+libs+tools.cdac -c $(_BuildConfig) -rc $(_BuildConfig) -lc $(_BuildConfig) - nameSuffix: CdacDumpGeneration - timeoutInMinutes: 120 - postBuildSteps: - - script: $(Build.SourcesDirectory)$(dir).dotnet$(dir)dotnet$(exeExt) msbuild - $(Build.SourcesDirectory)/src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj - /t:GenerateAllDumps - /p:CIDumpVersionsOnly=true - /p:SetDisableAuxProviderSignatureCheck=true - /p:TargetArchitecture=$(archType) - -bl:$(Build.SourcesDirectory)/artifacts/log/DumpGeneration.binlog - displayName: 'Generate cDAC Dumps' - - template: /eng/pipelines/common/upload-artifact-step.yml - parameters: - rootFolder: $(Build.SourcesDirectory)/artifacts/dumps/cdac - includeRootFolder: false - archiveType: tar - archiveExtension: .tar.gz - tarCompression: gz - artifactName: CdacDumps_$(osGroup)_$(archType) - displayName: cDAC Dump Artifacts + - ${{ if and(eq(parameters.cdacDumpTestMode, 'single-leg'), ne(variables['Build.Reason'], 'Schedule')) }}: + - stage: CdacDumpTests + dependsOn: [] + jobs: + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: ${{ parameters.cdacDumpPlatforms }} + shouldContinueOnError: true + jobParameters: + nameSuffix: CdacDumpTest + buildArgs: -s clr+libs+tools.cdac+tools.cdacdumptests -c $(_BuildConfig) -rc $(_BuildConfig) -lc $(_BuildConfig) /p:SkipDumpVersions=net10.0 + timeoutInMinutes: 180 + postBuildSteps: + - template: /eng/pipelines/cdac/prepare-cdac-helix-steps.yml + - template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml + parameters: + displayName: 'Send cDAC Dump Tests to Helix' + sendParams: $(Build.SourcesDirectory)/src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj /t:Test /p:TargetOS=$(osGroup) /p:TargetArchitecture=$(archType) /p:HelixTargetQueues=$(CdacHelixQueue) /p:TestHostPayload=$(TestHostPayloadDir) /p:DumpTestsPayload=$(Build.SourcesDirectory)/artifacts/helixPayload/cdac /bl:$(Build.SourcesDirectory)/artifacts/log/SendToHelix.binlog + environment: + _Creator: dotnet-bot + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + NUGET_PACKAGES: $(Build.SourcesDirectory)$(dir).packages + - pwsh: | + if ("$(Agent.JobStatus)" -ne "Succeeded") { + Write-Error "One or more cDAC dump test failures were detected. Failing the job." + exit 1 + } + displayName: 'Fail on test errors' + condition: always() # - # cDAC Dump Tests — Download dumps from all platforms, run tests cross-platform + # cDAC X-Plat Dump Generation and Testing — Two-stage flow: + # 1. Generate dumps on each platform via Helix, download and publish as artifacts + # 2. Download all platforms' dumps and run tests on each target platform # - - stage: DumpTest - dependsOn: - - DumpCreation - jobs: - - template: /eng/pipelines/common/platform-matrix.yml - parameters: - jobTemplate: /eng/pipelines/common/global-build-job.yml - buildConfig: release - platforms: ${{ parameters.cdacDumpPlatforms }} - jobParameters: - buildArgs: -s tools.cdacdumptests /p:SkipDumpVersions=net10.0 - nameSuffix: CdacDumpTests - timeoutInMinutes: 60 - postBuildSteps: - # Download and test against dumps from each platform - - ${{ each dumpPlatform in parameters.cdacDumpPlatforms }}: - - template: /eng/pipelines/common/download-artifact-step.yml + - ${{ if or(eq(parameters.cdacDumpTestMode, 'xplat'), eq(variables['Build.Reason'], 'Schedule')) }}: + - stage: CdacXPlatDumpGen + dependsOn: [] + jobs: + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: ${{ parameters.cdacDumpPlatforms }} + shouldContinueOnError: true + jobParameters: + nameSuffix: CdacXPlatDumpGen + buildArgs: -s clr+libs+tools.cdac+tools.cdacdumptests -c $(_BuildConfig) -rc $(_BuildConfig) -lc $(_BuildConfig) /p:SkipDumpVersions=net10.0 + timeoutInMinutes: 180 + postBuildSteps: + - template: /eng/pipelines/cdac/prepare-cdac-helix-steps.yml + - template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml parameters: - artifactName: CdacDumps_${{ dumpPlatform }} - artifactFileName: CdacDumps_${{ dumpPlatform }}.tar.gz - unpackFolder: $(Build.SourcesDirectory)/artifacts/dumps/${{ dumpPlatform }} - displayName: '${{ dumpPlatform }} Dumps' - - script: $(Build.SourcesDirectory)$(dir).dotnet$(dir)dotnet$(exeExt) test - $(Build.SourcesDirectory)/src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj - --no-build - --logger "trx;LogFileName=CdacDumpTests_${{ dumpPlatform }}.trx" - --results-directory $(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/${{ dumpPlatform }} - displayName: 'Run cDAC Dump Tests (${{ dumpPlatform }} dumps)' - continueOnError: true - env: - CDAC_DUMP_ROOT: $(Build.SourcesDirectory)/artifacts/dumps/${{ dumpPlatform }} - - task: PublishTestResults@2 - displayName: 'Publish Results ($(osGroup)-$(archType) → ${{ dumpPlatform }})' + displayName: 'Send cDAC Dump Gen to Helix' + sendParams: $(Build.SourcesDirectory)/src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj /t:Test /p:DumpOnly=true /p:TargetOS=$(osGroup) /p:TargetArchitecture=$(archType) /p:HelixTargetQueues=$(CdacHelixQueue) /p:TestHostPayload=$(TestHostPayloadDir) /p:DumpTestsPayload=$(Build.SourcesDirectory)/artifacts/helixPayload/cdac /bl:$(Build.SourcesDirectory)/artifacts/log/SendDumpGenToHelix.binlog + environment: + _Creator: dotnet-bot + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + NUGET_PACKAGES: $(Build.SourcesDirectory)$(dir).packages + # After Helix completes and DownloadFilesFromResults runs, publish the dump tar + - pwsh: | + $resultsDir = "$(Build.SourcesDirectory)/artifacts/helixresults" + Write-Host "Helix results directory contents:" + if (Test-Path $resultsDir) { + Get-ChildItem -Recurse $resultsDir | Select-Object -ExpandProperty FullName | ForEach-Object { Write-Host " $_" } + } else { + Write-Host " Directory not found: $resultsDir" + } + displayName: 'List Helix Results' + - task: PublishPipelineArtifact@1 inputs: - testResultsFormat: VSTest - testResultsFiles: '**/*.trx' - searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)/${{ dumpPlatform }}' - testRunTitle: 'cDAC Dump Tests $(osGroup)-$(archType) → ${{ dumpPlatform }}' - failTaskOnFailedTests: true - publishRunAttachments: true - buildConfiguration: $(_BuildConfig) - continueOnError: true + targetPath: $(Build.SourcesDirectory)/artifacts/helixresults + artifactName: CdacDumps_$(osGroup)_$(archType) + displayName: 'Publish Dump Artifacts' + - pwsh: | + if ("$(Agent.JobStatus)" -ne "Succeeded") { + Write-Error "One or more cDAC dump generation failures were detected. Failing the job." + exit 1 + } + displayName: 'Fail on dump generation errors' + condition: always() + + - stage: CdacXPlatDumpTests + dependsOn: + - CdacXPlatDumpGen + jobs: + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/global-build-job.yml + buildConfig: release + platforms: ${{ parameters.cdacDumpPlatforms }} + shouldContinueOnError: true + jobParameters: + nameSuffix: CdacXPlatDumpTest + buildArgs: -s clr+libs+tools.cdac+tools.cdacdumptests -c $(_BuildConfig) -rc $(_BuildConfig) -lc $(_BuildConfig) /p:SkipDumpVersions=net10.0 + timeoutInMinutes: 180 + postBuildSteps: + - template: /eng/pipelines/cdac/prepare-cdac-helix-steps.yml + parameters: + buildDebuggees: false + skipDebuggeeCopy: true + # Download dump artifacts from all source platforms + - ${{ each platform in parameters.cdacDumpPlatforms }}: + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: CdacDumps_${{ platform }} + targetPath: $(Build.SourcesDirectory)/artifacts/xplatDumps/${{ platform }} + displayName: 'Download dumps from ${{ platform }}' + # Extract dump tars into the Helix payload + - pwsh: | + $platforms = "${{ join(';', parameters.cdacDumpPlatforms) }}".Split(';') + $payloadDumpsDir = "$(Build.SourcesDirectory)/artifacts/helixPayload/cdac/dumps" + foreach ($platform in $platforms) { + $downloadDir = "$(Build.SourcesDirectory)/artifacts/xplatDumps/$platform" + $tarFile = Get-ChildItem -Recurse -Filter "dumps.tar.gz" -Path $downloadDir | Select-Object -First 1 -ExpandProperty FullName + if (-not $tarFile) { + Write-Error "No dumps.tar.gz found for platform $platform in $downloadDir" + exit 1 + } + $destDir = Join-Path $payloadDumpsDir $platform + New-Item -ItemType Directory -Force -Path $destDir | Out-Null + Write-Host "Extracting $tarFile to $destDir" + tar -xzf "$tarFile" -C "$destDir" + } + Write-Host "Dump payload contents:" + Get-ChildItem -Recurse $payloadDumpsDir -Filter "*.dmp" | Select-Object -ExpandProperty FullName | ForEach-Object { Write-Host " $_" } + displayName: 'Extract Dump Artifacts into Payload' + - template: /eng/pipelines/common/templates/runtimes/send-to-helix-inner-step.yml + parameters: + displayName: 'Send cDAC X-Plat Dump Tests to Helix' + sendParams: $(Build.SourcesDirectory)/src/native/managed/cdac/tests/DumpTests/cdac-dump-xplat-test-helix.proj /t:Test /p:TargetOS=$(osGroup) /p:TargetArchitecture=$(archType) /p:HelixTargetQueues=$(CdacHelixQueue) /p:TestHostPayload=$(TestHostPayloadDir) /p:DumpTestsPayload=$(Build.SourcesDirectory)/artifacts/helixPayload/cdac /bl:$(Build.SourcesDirectory)/artifacts/log/SendXPlatTestToHelix.binlog + environment: + _Creator: dotnet-bot + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + NUGET_PACKAGES: $(Build.SourcesDirectory)$(dir).packages + SourcePlatforms: ${{ join(';', parameters.cdacDumpPlatforms) }} + - pwsh: | + if ("$(Agent.JobStatus)" -ne "Succeeded") { + Write-Error "One or more cDAC x-plat dump test failures were detected. Failing the job." + exit 1 + } + displayName: 'Fail on test errors' condition: always() - # Fail the job if any test or publish step above reported issues. - - script: echo "One or more dump test steps failed." && exit 1 - displayName: 'Fail if tests failed' - condition: eq(variables['Agent.JobStatus'], 'SucceededWithIssues') diff --git a/src/native/managed/cdac/tests/DumpTests/Debuggees/CCWInterfaces/CCWInterfaces.csproj b/src/native/managed/cdac/tests/DumpTests/Debuggees/CCWInterfaces/CCWInterfaces.csproj index bb776824769fe6..9d3e9f517d21fd 100644 --- a/src/native/managed/cdac/tests/DumpTests/Debuggees/CCWInterfaces/CCWInterfaces.csproj +++ b/src/native/managed/cdac/tests/DumpTests/Debuggees/CCWInterfaces/CCWInterfaces.csproj @@ -1,5 +1,6 @@ Full + true diff --git a/src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.props b/src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.props index 58e85258f42834..3c3758c5c2e1c3 100644 --- a/src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.props +++ b/src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.props @@ -13,5 +13,7 @@ Heap + + false diff --git a/src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.targets b/src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.targets index 8c6ba474d40e6c..31af6818088868 100644 --- a/src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.targets +++ b/src/native/managed/cdac/tests/DumpTests/Debuggees/Directory.Build.targets @@ -5,7 +5,10 @@ to extract the DumpTypes property. Returns the project name with DumpTypes metadata. --> - <_DumpTypeOutput Include="$(MSBuildProjectName)" DumpTypes="$(DumpTypes)" /> + <_DumpTypeOutput Include="$(MSBuildProjectName)" + DumpTypes="$(DumpTypes)" + WindowsOnly="$(WindowsOnly)" + ProjectPath="$(MSBuildProjectFullPath)" /> diff --git a/src/native/managed/cdac/tests/DumpTests/Debuggees/PInvokeStub/PInvokeStub.csproj b/src/native/managed/cdac/tests/DumpTests/Debuggees/PInvokeStub/PInvokeStub.csproj index 55573f73cffd64..4ae7ca6d60e411 100644 --- a/src/native/managed/cdac/tests/DumpTests/Debuggees/PInvokeStub/PInvokeStub.csproj +++ b/src/native/managed/cdac/tests/DumpTests/Debuggees/PInvokeStub/PInvokeStub.csproj @@ -4,5 +4,6 @@ ILStub at execution time. SYSLIB1054 warns about preferring LibraryImport. --> $(NoWarn);SYSLIB1054 Full + true diff --git a/src/native/managed/cdac/tests/DumpTests/Debuggees/RCW/RCW.csproj b/src/native/managed/cdac/tests/DumpTests/Debuggees/RCW/RCW.csproj index 69a9ea88447b47..8fbeb470e46055 100644 --- a/src/native/managed/cdac/tests/DumpTests/Debuggees/RCW/RCW.csproj +++ b/src/native/managed/cdac/tests/DumpTests/Debuggees/RCW/RCW.csproj @@ -3,5 +3,6 @@ $(NoWarn);CA1416 Full + true diff --git a/src/native/managed/cdac/tests/DumpTests/Debuggees/RCWCleanupList/RCWCleanupList.csproj b/src/native/managed/cdac/tests/DumpTests/Debuggees/RCWCleanupList/RCWCleanupList.csproj index 69a9ea88447b47..8fbeb470e46055 100644 --- a/src/native/managed/cdac/tests/DumpTests/Debuggees/RCWCleanupList/RCWCleanupList.csproj +++ b/src/native/managed/cdac/tests/DumpTests/Debuggees/RCWCleanupList/RCWCleanupList.csproj @@ -3,5 +3,6 @@ $(NoWarn);CA1416 Full + true diff --git a/src/native/managed/cdac/tests/DumpTests/Debuggees/VarargPInvoke/VarargPInvoke.csproj b/src/native/managed/cdac/tests/DumpTests/Debuggees/VarargPInvoke/VarargPInvoke.csproj index 88f091e9659336..be9a87ce7e4af6 100644 --- a/src/native/managed/cdac/tests/DumpTests/Debuggees/VarargPInvoke/VarargPInvoke.csproj +++ b/src/native/managed/cdac/tests/DumpTests/Debuggees/VarargPInvoke/VarargPInvoke.csproj @@ -4,5 +4,6 @@ a VarargPInvokeStub at execution time. SYSLIB1054 warns about preferring LibraryImport. --> $(NoWarn);SYSLIB1054 Full + true diff --git a/src/native/managed/cdac/tests/DumpTests/DumpTests.targets b/src/native/managed/cdac/tests/DumpTests/DumpTests.targets index bd6855d55876bf..5ee2d6b3b0db04 100644 --- a/src/native/managed/cdac/tests/DumpTests/DumpTests.targets +++ b/src/native/managed/cdac/tests/DumpTests/DumpTests.targets @@ -80,6 +80,21 @@ Importance="normal" /> + + + + + + + + + + @@ -116,6 +131,13 @@ Condition="!Exists('$(_DumpInfoFile)')" Importance="high" /> + + + + + diff --git a/src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj b/src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj index a9f6a176af4d19..073649dfd52218 100644 --- a/src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj +++ b/src/native/managed/cdac/tests/DumpTests/Microsoft.Diagnostics.DataContractReader.DumpTests.csproj @@ -40,5 +40,86 @@ + + + + + + <_HelixTestsDir>$([MSBuild]::NormalizeDirectory('$(HelixPayloadDir)', 'tests')) + <_HelixDebuggeesDir>$([MSBuild]::NormalizeDirectory('$(HelixPayloadDir)', 'debuggees')) + + + + + <_TestOutput Include="$(OutputPath)**\*" /> + + + + + + <_XunitConsoleFiles Include="$([System.IO.Path]::GetDirectoryName('$(XunitConsoleNetCoreAppPath)'))\*" /> + + + + + + + + + + + + + <_HeapDebuggee Include="@(_DebuggeeWithTypes)" Condition="$([System.String]::new('%(DumpTypes)').Contains('Heap'))" DumpDir="heap" MiniDumpType="2" /> + <_FullDebuggee Include="@(_DebuggeeWithTypes)" Condition="$([System.String]::new('%(DumpTypes)').Contains('Full'))" DumpDir="full" MiniDumpType="4" /> + <_AllDebuggeeMetadata Include="@(_HeapDebuggee);@(_FullDebuggee)" /> + + + + <_MetadataLines Include="<Project>" /> + <_MetadataLines Include=" <ItemGroup>" /> + <_MetadataLines Include="@(_AllDebuggeeMetadata->' <_Debuggee Include="%(Identity)" DumpDir="%(DumpDir)" MiniDumpType="%(MiniDumpType)" />')" /> + <_MetadataLines Include=" </ItemGroup>" /> + <_MetadataLines Include="</Project>" /> + + + + + + + + + + <_DebuggeeBinDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts', 'bin', 'DumpTests', '$(DebuggeeName)', '$(DebuggeeConfiguration)', '$(NetCoreAppCurrent)')) + <_HelixDebuggeeDir>$([MSBuild]::NormalizeDirectory('$(_HelixDebuggeesDir)', '$(DebuggeeName)')) + + + + <_DebuggeeOutput Include="$(_DebuggeeBinDir)**\*" /> + + + diff --git a/src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj b/src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj new file mode 100644 index 00000000000000..9b89de9084d17e --- /dev/null +++ b/src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj @@ -0,0 +1,155 @@ + + + + + + + msbuild + true + $(_Creator) + true + $(BUILD_BUILDNUMBER) + 01:00:00 + + + + + true + true + test/cdac/dumptests/ + pr/dotnet/runtime/cdac-dump-tests + + + + + test/cdac/dumpgen/ + pr/dotnet/runtime/cdac-dump-gen + + + + + + + + %(Identity) + + + + + + + + + + + <_DumpGenCommands>@(_Debuggee->'mkdir %HELIX_WORKITEM_PAYLOAD%\dumps\local\%(DumpDir)\%(Identity) & set "DOTNET_DbgMiniDumpType=%(MiniDumpType)" & set "DOTNET_DbgMiniDumpName=%HELIX_WORKITEM_PAYLOAD%\dumps\local\%(DumpDir)\%(Identity)\%(Identity).dmp" & %HELIX_CORRELATION_PAYLOAD%\dotnet.exe exec %HELIX_WORKITEM_PAYLOAD%\debuggees\%(Identity)\%(Identity).dll', ' & ') + <_DumpInfoCommand>echo {"os":"$(TargetOS)","arch":"$(TargetArchitecture)"}> %HELIX_WORKITEM_PAYLOAD%\dumps\local\dump-info.json + + + + + <_TestCommand>%HELIX_CORRELATION_PAYLOAD%\dotnet.exe exec --runtimeconfig %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json %HELIX_WORKITEM_PAYLOAD%\tests\xunit.console.dll %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo + <_FullCommand>$(_DumpGenCommands) & $(_DumpInfoCommand) & $(_TestCommand) + + + + + <_TarCommand>tar -czf %HELIX_WORKITEM_UPLOAD_ROOT%\dumps.tar.gz -C %HELIX_WORKITEM_PAYLOAD%\dumps . + <_FullCommand>$(_DumpGenCommands) & $(_DumpInfoCommand) & $(_TarCommand) + + + + + <_DumpGenCommands>@(_Debuggee->'mkdir -p $HELIX_WORKITEM_PAYLOAD/dumps/local/%(DumpDir)/%(Identity) && DOTNET_DbgMiniDumpType=%(MiniDumpType) DOTNET_DbgMiniDumpName=$HELIX_WORKITEM_PAYLOAD/dumps/local/%(DumpDir)/%(Identity)/%(Identity).dmp $HELIX_CORRELATION_PAYLOAD/dotnet exec $HELIX_WORKITEM_PAYLOAD/debuggees/%(Identity)/%(Identity).dll || true', ' && ') + <_DumpInfoCommand>echo '{"os":"$(TargetOS)","arch":"$(TargetArchitecture)"}' > $HELIX_WORKITEM_PAYLOAD/dumps/local/dump-info.json + + + + + <_TestCommand>$HELIX_CORRELATION_PAYLOAD/dotnet exec --runtimeconfig $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json $HELIX_WORKITEM_PAYLOAD/tests/xunit.console.dll $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo + <_FullCommand>$(_DumpGenCommands) && $(_DumpInfoCommand) && $(_TestCommand) + + + + + <_TarCommand>tar -czf $HELIX_WORKITEM_UPLOAD_ROOT/dumps.tar.gz -C $HELIX_WORKITEM_PAYLOAD/dumps . + <_FullCommand>$(_DumpGenCommands) && $(_DumpInfoCommand) && $(_TarCommand) + + + + + + + + + + + + + + + + + + + + + + + @(HelixPreCommand) + + + + + + $(DumpTestsPayload) + $(_FullCommand) + $(WorkItemTimeout) + + + + + + + $(DumpTestsPayload) + $(_FullCommand) + $(WorkItemTimeout) + dumps.tar.gz + + + + diff --git a/src/native/managed/cdac/tests/DumpTests/cdac-dump-xplat-test-helix.proj b/src/native/managed/cdac/tests/DumpTests/cdac-dump-xplat-test-helix.proj new file mode 100644 index 00000000000000..1ef4c4f60a4ff5 --- /dev/null +++ b/src/native/managed/cdac/tests/DumpTests/cdac-dump-xplat-test-helix.proj @@ -0,0 +1,88 @@ + + + + + + msbuild + true + true + $(_Creator) + true + true + test/cdac/xplat-dumptests/ + $(BUILD_BUILDNUMBER) + pr/dotnet/runtime/cdac-xplat-dump-tests + 01:00:00 + + + + + + + + %(Identity) + + + + + + <_SourcePlatform Include="$(SourcePlatforms)" /> + + + + + <_TestCommands>@(_SourcePlatform->'set "CDAC_DUMP_ROOT=%HELIX_WORKITEM_PAYLOAD%\dumps\%(Identity)" & %HELIX_CORRELATION_PAYLOAD%\dotnet.exe exec --runtimeconfig %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json %HELIX_WORKITEM_PAYLOAD%\tests\xunit.console.dll %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults_%(Identity).xml -nologo', ' & ') + + + + <_TestCommands>@(_SourcePlatform->'CDAC_DUMP_ROOT=$HELIX_WORKITEM_PAYLOAD/dumps/%(Identity) $HELIX_CORRELATION_PAYLOAD/dotnet exec --runtimeconfig $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json $HELIX_WORKITEM_PAYLOAD/tests/xunit.console.dll $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults_%(Identity).xml -nologo', ' %3B ') + + + + + + + + + @(HelixPreCommand) + + + + + + $(DumpTestsPayload) + $(_TestCommands) + $(WorkItemTimeout) + + + +