Skip to content

Commit

Permalink
fix webgpu test launch
Browse files Browse the repository at this point in the history
  • Loading branch information
fs-eire committed Sep 13, 2022
1 parent e104d17 commit 86d8d3a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
3 changes: 1 addition & 2 deletions js/web/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ module.exports = function (config) {
ChromeTest: { base: 'ChromeHeadless', flags: ['--enable-features=SharedArrayBuffer'] },
ChromePerf: { base: 'Chrome', flags: ['--window-size=1,1', '--enable-features=SharedArrayBuffer'] },
ChromeDebug: { debug: true, base: 'Chrome', flags: ['--remote-debugging-port=9333', '--enable-features=SharedArrayBuffer'] },
ChromeCanaryTest: { base: 'ChromeCanaryHeadless', flags: ['--enable-features=SharedArrayBuffer', '--enable-unsafe-webgpu'] },
ChromeCanaryPerf: { base: 'ChromeCanary', flags: ['--window-size=1,1', '--enable-features=SharedArrayBuffer', '--enable-unsafe-webgpu'] },
ChromeCanaryTest: { base: 'ChromeCanary', flags: ['--window-size=1,1', '--enable-features=SharedArrayBuffer', '--enable-unsafe-webgpu'] },
ChromeCanaryDebug: { debug: true, base: 'ChromeCanary', flags: ['--remote-debugging-port=9333', '--enable-features=SharedArrayBuffer', '--enable-unsafe-webgpu'] },

//
Expand Down
26 changes: 15 additions & 11 deletions js/web/script/test-runner-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,17 +585,21 @@ function getBrowserNameFromEnv(env: TestRunnerCliArgs['env'], mode: 'debug'|'per
}

function selectChromeBrowser(mode: 'debug'|'perf'|'test', webgpu: boolean) {
let browserName = 'Chrome';
if (webgpu) {
browserName += 'Canary';
}

switch (mode) {
case 'debug':
return browserName + 'Debug';
case 'perf':
return browserName + 'Perf';
default:
return browserName + 'Test';
switch (mode) {
case 'debug':
return 'ChromeCanaryDebug';
default:
return 'ChromeCanaryTest';
}
} else {
switch (mode) {
case 'debug':
return 'ChromeDebug';
case 'perf':
return 'ChromePerf';
default:
return 'ChromeTest';
}
}
}

0 comments on commit 86d8d3a

Please sign in to comment.