[js/web] add CI steps to log info for test failure investigating (#18418)

### Description
add CI steps to log info for test failure investigating.

Currently Web CI is marked as 'optional'. This change adds some script
to dump debug info for investigating the random test failure
This commit is contained in:
Yulong Wang 2023-11-14 11:40:58 -08:00 committed by GitHub
parent a6b515fad5
commit d22b1af5da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,18 +156,28 @@ jobs:
workingDirectory: $(Build.BinariesDirectory)
errorActionPreference: stop
displayName: 'Pack NPM packages'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: Get-WmiObject Win32_Process -Filter "name = 'msedge.exe'" | Select-Object CommandLine | Format-List
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Dump active Edge processes (before tests 0)'
- script: |
npm test -- -e=edge -b=webgl,wasm,xnnpack
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
- task: PowerShell@2
inputs:
targetType: 'inline'
script: Get-WmiObject Win32_Process -Filter "name = 'msedge.exe'" | Select-Object CommandLine | Format-List
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Dump active Edge processes (before tests 1)'
- script: |
npm test -- suite1 -e=edge -b=webgpu --io-binding=gpu-tensor $(webgpuCommandlineExtraFlags)
workingDirectory: '$(Build.SourcesDirectory)\js\web'
@ -177,22 +187,52 @@ jobs:
# investigation is ongoing for the root cause of the random failure (Edge crash).
# TODO: remove this line once the root cause is found and fixed.
continueOnError: true
- task: PowerShell@2
inputs:
targetType: 'inline'
script: Get-WmiObject Win32_Process -Filter "name = 'msedge.exe'" | Select-Object CommandLine | Format-List
workingDirectory: '$(Build.SourcesDirectory)\js\web'
condition: eq('${{ parameters.RunWebGpuTests }}', 'true')
displayName: 'Dump active Edge processes (before tests 2)'
- script: |
npm test -- suite1 -e=edge -b=webgpu --io-binding=gpu-location $(webgpuCommandlineExtraFlags)
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Run ort-web tests (Suite1, webgpu, IO-binding=gpu-location)'
condition: eq('${{ parameters.RunWebGpuTests }}', 'true')
retryCountOnTaskFailure: 3
- task: PowerShell@2
inputs:
targetType: 'inline'
script: Get-WmiObject Win32_Process -Filter "name = 'msedge.exe'" | Select-Object CommandLine | Format-List
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Dump active Edge processes (before tests 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
- task: PowerShell@2
inputs:
targetType: 'inline'
script: Get-WmiObject Win32_Process -Filter "name = 'msedge.exe'" | Select-Object CommandLine | Format-List
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Dump active Edge processes (before tests 4)'
- script: |
npm test -- --wasm-enable-proxy -b=wasm -e=edge
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Run ort-web tests - WebAssembly: proxy'
condition: and(succeeded(), eq('${{ parameters.BuildConfig }}', 'Release'))
- task: PowerShell@2
inputs:
targetType: 'inline'
script: Get-WmiObject Win32_Process -Filter "name = 'msedge.exe'" | Select-Object CommandLine | Format-List
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'Dump active Edge processes (before E2E tests)'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: dir -r $(Build.SourcesDirectory)\build\js\e2e
workingDirectory: '$(Build.SourcesDirectory)\js\web'
errorActionPreference: continue
displayName: 'Dump E2E test folder (before E2E tests)'
- script: |
npm run test:e2e -- --browser=Edge_default
workingDirectory: '$(Build.SourcesDirectory)\js\web'