Skip to content

Commit a788514

Browse files
authored
[js/web] dump debug logs for karma for diagnose purpose (#19785)
### Description dump debug logs for karma for diagnose purpose. This is for debugging the CI issue of Chrome launch failure and considered temporary.
1 parent 1bfc266 commit a788514

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

js/web/script/test-runner-cli.ts

+3
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,9 @@ async function main() {
569569
if (webnn) {
570570
chromiumFlags.push('--enable-experimental-web-platform-features');
571571
}
572+
if (process.argv.includes('--karma-debug')) {
573+
karmaArgs.push('--log-level debug');
574+
}
572575
karmaArgs.push(`--bundle-mode=${args.bundleMode}`);
573576
karmaArgs.push(...chromiumFlags.map(flag => `--chromium-flags=${flag}`));
574577
if (browser.startsWith('Edge')) {

tools/ci_build/github/azure-pipelines/templates/win-web-ci.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -153,31 +153,31 @@ jobs:
153153
errorActionPreference: stop
154154
displayName: 'Pack NPM packages'
155155
- script: |
156-
npm test -- -e=chrome -b=webgl,wasm
156+
npm test -- -e=chrome -b=webgl,wasm --karma-debug
157157
workingDirectory: '$(Build.SourcesDirectory)\js\web'
158158
displayName: 'Run ort-web tests (wasm,webgl backend)'
159159
condition: eq('${{ parameters.RunWebGpuTests }}', 'false')
160160
- script: |
161-
npm test -- -e=chrome -b=webgl,wasm,webgpu $(webgpuCommandlineExtraFlags)
161+
npm test -- -e=chrome -b=webgl,wasm,webgpu --karma-debug $(webgpuCommandlineExtraFlags)
162162
workingDirectory: '$(Build.SourcesDirectory)\js\web'
163163
displayName: 'Run ort-web tests (ALL backends)'
164164
condition: eq('${{ parameters.RunWebGpuTests }}', 'true')
165165
- script: |
166-
npm test -- suite1 -e=chrome -b=webgpu --io-binding=gpu-tensor $(webgpuCommandlineExtraFlags)
166+
npm test -- suite1 -e=chrome -b=webgpu --io-binding=gpu-tensor --karma-debug $(webgpuCommandlineExtraFlags)
167167
workingDirectory: '$(Build.SourcesDirectory)\js\web'
168168
displayName: 'Run ort-web tests (Suite1, webgpu, IO-binding=gpu-tensor)'
169169
condition: eq('${{ parameters.RunWebGpuTests }}', 'true')
170170
- script: |
171-
npm test -- suite1 -e=chrome -b=webgpu --io-binding=gpu-location $(webgpuCommandlineExtraFlags)
171+
npm test -- suite1 -e=chrome -b=webgpu --io-binding=gpu-location --karma-debug $(webgpuCommandlineExtraFlags)
172172
workingDirectory: '$(Build.SourcesDirectory)\js\web'
173173
displayName: 'Run ort-web tests (Suite1, webgpu, IO-binding=gpu-location)'
174174
condition: eq('${{ parameters.RunWebGpuTests }}', 'true')
175175
- script: |
176-
npm test -- --webgl-texture-pack-mode -b=webgl -e=chrome
176+
npm test -- --webgl-texture-pack-mode -b=webgl -e=chrome --karma-debug
177177
workingDirectory: '$(Build.SourcesDirectory)\js\web'
178178
displayName: 'Run ort-web tests - WebGL: packed mode'
179179
- script: |
180-
npm test -- --wasm-enable-proxy -b=wasm -e=chrome
180+
npm test -- --wasm-enable-proxy -b=wasm -e=chrome --karma-debug
181181
workingDirectory: '$(Build.SourcesDirectory)\js\web'
182182
displayName: 'Run ort-web tests - WebAssembly: proxy'
183183
condition: and(succeeded(), eq('${{ parameters.BuildConfig }}', 'Release'))

0 commit comments

Comments
 (0)