Skip to content

Commit

Permalink
[Windows] Add crash dumps as artifacts to tests (#21493)
Browse files Browse the repository at this point in the history
* Test dump file artifacts

* Adjust func

* oops

* Use better reg key func

* Fix key value use

* oops

* Set reg key value in build yml

* Fix

* Test adding additional logging

* Test1

* Add log test

* Revert changes

* Change crash dump location

---------

Co-authored-by: Mike Corsaro <mikecorsaro@microsoft.com>
  • Loading branch information
Foda and Mike Corsaro committed Mar 28, 2024
1 parent 638b011 commit c7d1a4e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions eng/pipelines/common/device-tests-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ steps:
condition: always()
continueOnError: true
- ${{ if eq(parameters.platform, 'windows')}}:
- pwsh: |
$errorPath = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps"
New-ItemProperty -Path $errorPath -Name DumpFolder -PropertyType String -Value "$(Build.ArtifactStagingDirectory)/crash-dumps"
New-ItemProperty -Path $errorPath -Name DumpType -PropertyType DWORD -Value 2
displayName: 'Set dump file location'
continueOnError: true
timeoutInMinutes: 5
- pwsh: |
./build.ps1 -Script eng/devices/${{ parameters.platform }}.cake --project="${{ parameters.path }}" --device=${{ parameters.device }} --apiversion=${{ parameters.apiversion }} --packageid=${{ parameters.windowsPackageId }} --results="$(TestResultsDirectory)" --binlog="$(LogDirectory)" ${{ parameters.cakeArgs }}
displayName: $(Agent.JobName)
Expand Down

0 comments on commit c7d1a4e

Please sign in to comment.