Skip to content

Commit

Permalink
Run sysdiagnose at the end of Azure Pipelines jobs on macOS
Browse files Browse the repository at this point in the history
This runs this with quite a lot of arguments, mostly to exclude the
generated and/or time-sensitive logs, along with the larger log
archive, for the sake of making this a sensible amount to store for
each run.

Notably, this does include crash and spin logs, which have already
proven useful to track down intermittent crashes on Azure Pipelines.
  • Loading branch information
gsnedders committed Oct 6, 2022
1 parent 9378fd0 commit 4118fc1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ jobs:
condition: succeededOrFailed()
displayName: 'Run tests (Safari Technology Preview)'
- template: tools/ci/azure/publish_logs.yml
- template: tools/ci/azure/sysdiagnose.yml

- job: tools_unittest_mac_py37
displayName: 'tools/ unittests: macOS + Python 3.7'
Expand Down Expand Up @@ -378,6 +379,7 @@ jobs:
inputs:
artifactName: 'edge-stable-results'
- template: tools/ci/azure/publish_logs.yml
- template: tools/ci/azure/sysdiagnose.yml
- template: tools/ci/azure/fyi_hook.yml
parameters:
dependsOn: results_edge_stable
Expand Down Expand Up @@ -416,6 +418,7 @@ jobs:
inputs:
artifactName: 'edge-dev-results'
- template: tools/ci/azure/publish_logs.yml
- template: tools/ci/azure/sysdiagnose.yml
- template: tools/ci/azure/fyi_hook.yml
parameters:
dependsOn: results_edge_dev
Expand Down Expand Up @@ -453,6 +456,7 @@ jobs:
inputs:
artifactName: 'edge-canary-results'
- template: tools/ci/azure/publish_logs.yml
- template: tools/ci/azure/sysdiagnose.yml
- template: tools/ci/azure/fyi_hook.yml
parameters:
dependsOn: results_edge_canary
Expand Down Expand Up @@ -493,6 +497,7 @@ jobs:
inputs:
artifactName: 'safari-results'
- template: tools/ci/azure/publish_logs.yml
- template: tools/ci/azure/sysdiagnose.yml
- template: tools/ci/azure/fyi_hook.yml
parameters:
dependsOn: results_safari
Expand Down Expand Up @@ -531,6 +536,7 @@ jobs:
inputs:
artifactName: 'safari-preview-results'
- template: tools/ci/azure/publish_logs.yml
- template: tools/ci/azure/sysdiagnose.yml
- template: tools/ci/azure/fyi_hook.yml
parameters:
dependsOn: results_safari_preview
Expand Down
13 changes: 13 additions & 0 deletions tools/ci/azure/sysdiagnose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
steps:
- script: |
mkdir -p /Users/runner/sysdiagnose
# No UI, and no time sensitive, generated, or archived logs
sudo sysdiagnose -ub -PGR -f /Users/runner/sysdiagnose -A sysdiagnose_$(System.JobPositionInPhase)
displayName: 'Collect sysdiagnose'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
- task: PublishBuildArtifacts@1
displayName: 'Publish sysdiagnose'
inputs:
pathtoPublish: /Users/runner/sysdiagnose/
artifactName: sysdiagnose
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))

0 comments on commit 4118fc1

Please sign in to comment.