mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 00:02:25 +00:00
Launch QA browsers on SwiftShader where there is no Metal
The shared launcher always asked for ANGLE's Metal backend, which exists only on macOS; on CI's Linux runners WebGL failed and the Street Level gate never saw the app start. The default is now Metal on macOS and SwiftShader elsewhere; QA_ANGLE still overrides it.
This commit is contained in:
1 parent
02ad2d045a
commit
ab5c593ab6
3 files changed
+24
-5
No files matched your search
@@ -1,6 +1,14 @@
|
||||
import { processTree, readProcesses } from './process.mjs';
|
||||
import puppeteer from 'puppeteer';
|
||||
import { chromeExecutablePath } from '../qa-chrome.mjs';
|
||||
/**
|
||||
* The ANGLE backend: QA_ANGLE, else Metal on macOS and SwiftShader elsewhere
|
||||
* (CI's Linux runners have no GPU, and Metal does not exist there).
|
||||
*/
|
||||
export function qaAngle(env = process.env, platform = process.platform) {
|
||||
return env.QA_ANGLE || (platform === 'darwin' ? 'metal' : 'swiftshader');
|
||||
}
|
||||
|
||||
/** Keep every scenario on the same headless GPU path. */
|
||||
export function launchBrowser({ args = [], ...options } = {}) {
|
||||
return puppeteer.launch({
|
||||
@@ -8,7 +16,7 @@ export function launchBrowser({ args = [], ...options } = {}) {
|
||||
...options,
|
||||
headless: true,
|
||||
args: [
|
||||
`--use-angle=${process.env.QA_ANGLE || 'metal'}`,
|
||||
`--use-angle=${qaAngle()}`,
|
||||
'--enable-gpu',
|
||||
...args,
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user