chore: add firefox-asan for stress tests (#24049)

This commit is contained in:
Andrey Lushnikov 2023-07-19 05:53:52 -07:00 committed by GitHub
parent fbb384483b
commit 1fdd7541e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 54 additions and 2 deletions

View File

@ -33,6 +33,8 @@ jobs:
- run: npm ci
- run: npm run build
- run: npx playwright install --with-deps
- run: npx playwright install firefox-asan
if: matrix.os != 'windows-latest'
- run: npm run stest contexts -- --project=chromium
if: always()
- run: npm run stest browsers -- --project=chromium

View File

@ -25,6 +25,12 @@
"installByDefault": true,
"browserVersion": "115.0"
},
{
"name": "firefox-asan",
"revision": "1420",
"installByDefault": false,
"browserVersion": "115.0"
},
{
"name": "firefox-beta",
"revision": "1420",

View File

@ -199,6 +199,29 @@ const DOWNLOAD_PATHS = {
'mac13-arm64': 'builds/firefox-beta/%s/firefox-beta-mac-13-arm64.zip',
'win64': 'builds/firefox-beta/%s/firefox-beta-win64.zip',
},
'firefox-asan': {
'<unknown>': undefined,
'generic-linux': 'builds/firefox/%s/firefox-asan-ubuntu-20.04.zip',
'generic-linux-arm64': undefined,
'ubuntu18.04': undefined,
'ubuntu20.04': undefined,
'ubuntu22.04': 'builds/firefox/%s/firefox-asan-ubuntu-22.04.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': undefined,
'ubuntu22.04-arm64': undefined,
'debian11': undefined,
'debian11-arm64': undefined,
'mac10.13': 'builds/firefox/%s/firefox-asan-mac-13.zip',
'mac10.14': 'builds/firefox/%s/firefox-asan-mac-13.zip',
'mac10.15': 'builds/firefox/%s/firefox-asan-mac-13.zip',
'mac11': 'builds/firefox/%s/firefox-asan-mac-13.zip',
'mac11-arm64': undefined,
'mac12': 'builds/firefox/%s/firefox-asan-mac-13.zip',
'mac12-arm64': undefined,
'mac13': 'builds/firefox/%s/firefox-asan-mac-13.zip',
'mac13-arm64': undefined,
'win64': undefined,
},
'webkit': {
'<unknown>': undefined,
'generic-linux': 'builds/webkit/%s/webkit-ubuntu-20.04.zip',
@ -338,7 +361,7 @@ function readDescriptors(browsersJSON: BrowsersJSON) {
}
export type BrowserName = 'chromium' | 'firefox' | 'webkit';
type InternalTool = 'ffmpeg' | 'firefox-beta' | 'chromium-with-symbols' | 'chromium-tip-of-tree' | 'android';
type InternalTool = 'ffmpeg' | 'firefox-beta' | 'firefox-asan' | 'chromium-with-symbols' | 'chromium-tip-of-tree' | 'android';
type ChromiumChannel = 'chrome' | 'chrome-beta' | 'chrome-dev' | 'chrome-canary' | 'msedge' | 'msedge-beta' | 'msedge-dev' | 'msedge-canary';
const allDownloadable = ['chromium', 'firefox', 'webkit', 'ffmpeg', 'firefox-beta', 'chromium-with-symbols', 'chromium-tip-of-tree'];
@ -545,6 +568,24 @@ export class Registry {
_isHermeticInstallation: true,
});
const firefoxAsan = descriptors.find(d => d.name === 'firefox-asan')!;
const firefoxAsanExecutable = findExecutablePath(firefoxAsan.dir, 'firefox');
this._executables.push({
type: 'browser',
name: 'firefox-asan',
browserName: 'firefox',
directory: firefoxAsan.dir,
executablePath: () => firefoxAsanExecutable,
executablePathOrDie: (sdkLanguage: string) => executablePathOrDie('firefox-asan', firefoxAsanExecutable, firefoxAsan.installByDefault, sdkLanguage),
installType: firefoxAsan.installByDefault ? 'download-by-default' : 'download-on-demand',
validateHostRequirements: (sdkLanguage: string) => this._validateHostRequirements(sdkLanguage, 'firefox', firefoxAsan.dir, ['firefox'], [], ['firefox']),
downloadURLs: this._downloadURLs(firefoxAsan),
browserVersion: firefoxAsan.browserVersion,
_install: () => this._downloadExecutable(firefoxAsan, firefoxAsanExecutable),
_dependencyGroup: 'firefox',
_isHermeticInstallation: true,
});
const firefoxBeta = descriptors.find(d => d.name === 'firefox-beta')!;
const firefoxBetaExecutable = findExecutablePath(firefoxBeta.dir, 'firefox');
this._executables.push({

View File

@ -30,7 +30,8 @@ export default defineConfig({
{
name: 'firefox',
use: {
browserName: 'firefox'
browserName: 'firefox',
channel: process.platform !== 'win32' ? 'firefox-asan' : undefined,
},
},

View File

@ -63,6 +63,8 @@ Example:
const descriptors = [browsersJSON.browsers.find(b => b.name === browserName)];
if (browserName === 'chromium')
descriptors.push(browsersJSON.browsers.find(b => b.name === 'chromium-with-symbols'));
if (browserName === 'firefox')
descriptors.push(browsersJSON.browsers.find(b => b.name === 'firefox-asan'));
if (!descriptors.every(d => !!d)) {
console.log(`Unknown browser "${browserName}"`);