Rerun the flaky ort-web tests automatically (#18187)

### Description
Retry 3 times at most if the web test fails.


### Motivation and Context
Web GPU tests are not stable.

From this link, we could find these ort-web tests are all in top 10
failing tasks.

https://dev.azure.com/onnxruntime/onnxruntime/_pipeline/analytics/stageawareoutcome?definitionId=161&contextType=build.

Generally, it could pass by manually rerunning it.
So, enable it to rerun automatically.

These test steps duration isn't long. So, it won't take too long to
retry.
This commit is contained in:
Yi Zhang 2023-11-03 16:34:56 +08:00 committed by GitHub
parent d8d79521ca
commit 9f5a6856fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,11 +161,13 @@ jobs:
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Run ort-web tests (wasm,webgl,xnnpack backend)'
condition: eq('${{ parameters.RunWebGpuTests }}', 'false')
retryCountOnTaskFailure: 3
- script: |
npm test -- -e=edge -b=webgl,wasm,xnnpack,webgpu $(webgpuCommandlineExtraFlags)
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Run ort-web tests (ALL backends)'
condition: eq('${{ parameters.RunWebGpuTests }}', 'true')
retryCountOnTaskFailure: 3
- script: |
npm test -- suite1 -e=edge -b=webgpu --io-binding=gpu-tensor $(webgpuCommandlineExtraFlags)
workingDirectory: '$(Build.SourcesDirectory)\js\web'
@ -180,10 +182,12 @@ jobs:
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Run ort-web tests (Suite1, webgpu, IO-binding=gpu-location)'
condition: eq('${{ parameters.RunWebGpuTests }}', 'true')
retryCountOnTaskFailure: 3
- script: |
npm test -- --webgl-texture-pack-mode -b=webgl -e=edge
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Run ort-web tests - WebGL: packed mode'
retryCountOnTaskFailure: 3
- script: |
npm test -- --wasm-enable-proxy -b=wasm -e=edge
workingDirectory: '$(Build.SourcesDirectory)\js\web'