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:
German Khokhlov committed 2026-11-11 15:55:12 +04:00
1 parent 02ad2d045a
commit ab5c593ab6
3 files changed
+24 -5

No files matched your search

+8 -2
View File
@@ -1,7 +1,7 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import puppeteer from 'puppeteer';
import { launchBrowser } from './browser.mjs';
import { launchBrowser, qaAngle } from './browser.mjs';
test('scenario launch uses the selected ANGLE backend and stays headless', async (t) => {
const prior = process.env.QA_ANGLE;
@@ -35,5 +35,11 @@ test('scenario launch uses the selected ANGLE backend and stays headless', async
assert.equal(options.protocolTimeout, 120000);
delete process.env.QA_ANGLE;
await launchBrowser();
assert.equal(options.args[0], '--use-angle=metal');
assert.equal(options.args[0], `--use-angle=${qaAngle({})}`);
});
test('the default backend is Metal on macOS and SwiftShader elsewhere', () => {
assert.equal(qaAngle({}, 'darwin'), 'metal');
assert.equal(qaAngle({}, 'linux'), 'swiftshader');
assert.equal(qaAngle({ QA_ANGLE: 'vulkan' }, 'linux'), 'vulkan');
});