Skip to content

Commit

Permalink
Bug 1611070 [wpt PR 21367] - [Azure Pipelines] add a `safaridriver_di…
Browse files Browse the repository at this point in the history
…agnose` variable for extra logs, a=testonly

Automatic update from web-platform-tests
[Azure Pipelines] add a `safaridriver_diagnose` variable for extra logs (#21367)

The affected_safari_preview and affected_without_changes_safari_preview
jobs do not upload logs, because they may run no tests and then not
create the ~/Library/Logs/com.apple.WebDriver/ directory, causing the
'Publish safaridriver logs' step to fail.

Note that the existing 'Publish results' step for infrastructure_mac
wasn't doing anything as nothing was put in the artifact directory, so
it was removed.
--

wpt-commits: af0bd2ce34817f6426104eaff91a073e591cb15d
wpt-pr: 21367
  • Loading branch information
foolip authored and moz-wptsync-bot committed May 27, 2020
1 parent 7fe93b7 commit 9b48382
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
13 changes: 8 additions & 5 deletions testing/web-platform/tests/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ trigger:
- triggers/safari_stable
- triggers/safari_preview

# Set safaridriver_diagnose to true to enable safaridriver diagnostics. The
# logs won't appear in `./wpt run` output but will be uploaded as an artifact.
variables:
safaridriver_diagnose: false

jobs:
# The affected tests jobs are unconditional for speed, as most PRs have one or
# more affected tests: https://github.com/web-platform-tests/wpt/issues/13936.
Expand Down Expand Up @@ -108,11 +113,7 @@ jobs:
displayName: 'Run tests (Firefox Nightly)'
- script: no_proxy='*' ./wpt run --yes --no-manifest-update --manifest MANIFEST.json --metadata infrastructure/metadata/ --log-mach - --log-mach-level info --channel preview safari infrastructure/
displayName: 'Run tests (Safari Technology Preview)'
- task: PublishBuildArtifacts@1
displayName: 'Publish results'
inputs:
artifactName: 'infrastructure'
condition: always()
- template: tools/ci/azure/publish_logs.yml

- job: tools_unittest_mac
displayName: 'tools/ unittests: macOS'
Expand Down Expand Up @@ -616,6 +617,7 @@ jobs:
displayName: 'Publish results'
inputs:
artifactName: 'safari-results'
- template: tools/ci/azure/publish_logs.yml
- template: tools/ci/azure/fyi_hook.yml
parameters:
dependsOn: results_safari
Expand Down Expand Up @@ -651,6 +653,7 @@ jobs:
displayName: 'Publish results'
inputs:
artifactName: 'safari-preview-results'
- template: tools/ci/azure/publish_logs.yml
- template: tools/ci/azure/fyi_hook.yml
parameters:
dependsOn: results_safari_preview
Expand Down
3 changes: 3 additions & 0 deletions testing/web-platform/tests/docs/running-tests/safari.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ argument:

The logs will be in `~/Library/Logs/com.apple.WebDriver/`.
See `man safaridriver` for more information.

To enable safaridriver diagnostics in Azure Pipelines, set
`safaridriver_diagnose` to `true` in `.azure-pipelines.yml`.
3 changes: 3 additions & 0 deletions testing/web-platform/tests/tools/ci/azure/install_safari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ parameters:

# Should match https://web-platform-tests.org/running-tests/safari.html
steps:
- script: defaults write com.apple.WebDriver DiagnosticsEnabled 1
displayName: 'Enable safaridriver diagnostics'
condition: eq(variables['safaridriver_diagnose'], true)
- ${{ if eq(parameters.channel, 'preview') }}:
- script: |
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install tools/ci/azure/safari-technology-preview.rb
Expand Down
7 changes: 7 additions & 0 deletions testing/web-platform/tests/tools/ci/azure/publish_logs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
steps:
- task: PublishBuildArtifacts@1
displayName: 'Publish safaridriver logs'
inputs:
pathtoPublish: /Users/runner/Library/Logs/com.apple.WebDriver/
artifactName: safaridriver-logs
condition: eq(variables['safaridriver_diagnose'], true)

0 comments on commit 9b48382

Please sign in to comment.