test: print "Using executable at ..." for custom executable (#6077)

This commit is contained in:
Dmitry Gozman 2021-04-05 09:19:39 -07:00 committed by GitHub
parent 4f7e7450e2
commit bd61f863c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -52,6 +52,8 @@ const serverEnv = new ServerEnv();
const browsers = ['chromium', 'webkit', 'firefox'] as BrowserName[]; const browsers = ['chromium', 'webkit', 'firefox'] as BrowserName[];
for (const browserName of browsers) { for (const browserName of browsers) {
const executablePath = getExecutablePath(browserName); const executablePath = getExecutablePath(browserName);
if (executablePath && (process.env.FOLIO_WORKER_INDEX === undefined || process.env.FOLIO_WORKER_INDEX === ''))
console.error(`Using executable at ${executablePath}`);
const mode = (process.env.PWMODE || 'default') as ('default' | 'driver' | 'service'); const mode = (process.env.PWMODE || 'default') as ('default' | 'driver' | 'service');
const options = { const options = {
mode, mode,

View file

@ -349,6 +349,7 @@ class Worker extends EventEmitter {
env: { env: {
FORCE_COLOR: process.stdout.isTTY ? '1' : '0', FORCE_COLOR: process.stdout.isTTY ? '1' : '0',
DEBUG_COLORS: process.stdout.isTTY ? '1' : '0', DEBUG_COLORS: process.stdout.isTTY ? '1' : '0',
FOLIO_WORKER_INDEX: String(this.index),
...process.env ...process.env
}, },
// Can't pipe since piping slows down termination for some reason. // Can't pipe since piping slows down termination for some reason.