mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 02:14:01 +00:00
fix(qa): choose portable browser renderers outside macOS
This commit is contained in:
1 parent
162ac4f2c9
commit
01dcecf6e9
4 files changed
+16
-4
No files matched your search
@@ -222,7 +222,9 @@ async function main() {
|
|||||||
args: [
|
args: [
|
||||||
'--no-sandbox',
|
'--no-sandbox',
|
||||||
'--disable-setuid-sandbox',
|
'--disable-setuid-sandbox',
|
||||||
...(SWIFTSHADER
|
// Metal is a macOS-only ANGLE backend; off-Mac the GPU branch has to fall
|
||||||
|
// back to the software rasterizer or WebGL init fails outright.
|
||||||
|
...(SWIFTSHADER || process.platform !== 'darwin'
|
||||||
? ['--use-gl=angle', '--use-angle=swiftshader']
|
? ['--use-gl=angle', '--use-angle=swiftshader']
|
||||||
: ['--use-angle=metal', '--enable-gpu', '--ignore-gpu-blocklist']),
|
: ['--use-angle=metal', '--enable-gpu', '--ignore-gpu-blocklist']),
|
||||||
'--disable-dev-shm-usage',
|
'--disable-dev-shm-usage',
|
||||||
|
|||||||
@@ -491,7 +491,10 @@ async function main() {
|
|||||||
...(executablePath ? { executablePath } : {}),
|
...(executablePath ? { executablePath } : {}),
|
||||||
args: [
|
args: [
|
||||||
'--no-sandbox', '--disable-setuid-sandbox',
|
'--no-sandbox', '--disable-setuid-sandbox',
|
||||||
'--use-angle=metal', '--enable-gpu', '--ignore-gpu-blocklist',
|
// Metal is a macOS-only ANGLE backend; anywhere else it fails WebGL init.
|
||||||
|
...(process.platform === 'darwin'
|
||||||
|
? ['--use-angle=metal', '--enable-gpu', '--ignore-gpu-blocklist']
|
||||||
|
: ['--use-gl=angle', '--use-angle=swiftshader']),
|
||||||
'--disable-dev-shm-usage', '--disable-background-timer-throttling',
|
'--disable-dev-shm-usage', '--disable-background-timer-throttling',
|
||||||
'--disable-renderer-backgrounding', '--window-size=1440,900',
|
'--disable-renderer-backgrounding', '--window-size=1440,900',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ import path from 'node:path';
|
|||||||
const APP_URL = process.env.QA_BASE_URL || 'http://localhost:4173';
|
const APP_URL = process.env.QA_BASE_URL || 'http://localhost:4173';
|
||||||
const argv = Object.fromEntries(process.argv.slice(2)
|
const argv = Object.fromEntries(process.argv.slice(2)
|
||||||
.map((a) => a.replace(/^--/, '').split('=')).map(([k, v]) => [k, v ?? true]));
|
.map((a) => a.replace(/^--/, '').split('=')).map(([k, v]) => [k, v ?? true]));
|
||||||
const ANGLE = String(argv.angle || 'metal');
|
// Metal is a macOS-only ANGLE backend; defaulting to it off-Mac fails WebGL init.
|
||||||
|
const ANGLE = String(argv.angle || (process.platform === 'darwin' ? 'metal' : 'swiftshader'));
|
||||||
const HEADFUL = !!argv.headful;
|
const HEADFUL = !!argv.headful;
|
||||||
// Austin airport apron by default — the site qa-floor-verify pins, where the
|
// Austin airport apron by default — the site qa-floor-verify pins, where the
|
||||||
// mesh sits ~150 m above the geoid and burial is unmistakable.
|
// mesh sits ~150 m above the geoid and burial is unmistakable.
|
||||||
|
|||||||
@@ -39,7 +39,13 @@ const executablePath = chromeCandidates.find((candidate) => fs.existsSync(candid
|
|||||||
const browser = await puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
headless: headful ? false : 'new',
|
headless: headful ? false : 'new',
|
||||||
...(executablePath ? { executablePath } : {}),
|
...(executablePath ? { executablePath } : {}),
|
||||||
args: ['--use-angle=metal', '--enable-gpu', '--no-sandbox'],
|
// Metal is a macOS-only ANGLE backend; anywhere else it fails WebGL init.
|
||||||
|
args: [
|
||||||
|
...(process.platform === 'darwin'
|
||||||
|
? ['--use-angle=metal', '--enable-gpu']
|
||||||
|
: ['--use-gl=angle', '--use-angle=swiftshader']),
|
||||||
|
'--no-sandbox',
|
||||||
|
],
|
||||||
});
|
});
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
const failures = [];
|
const failures = [];
|
||||||
|
|||||||
Reference in new issue
Block a user