From a44611d4c669eb2be094f8e1b295bbf4b62b2397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Wed, 30 Jun 2021 11:07:35 +0200 Subject: [PATCH] tests: hide output --- test/automation/src/playwrightDriver.ts | 12 ++++++++---- test/integration/browser/src/index.ts | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/test/automation/src/playwrightDriver.ts b/test/automation/src/playwrightDriver.ts index cef69c8b31a..67a89e254ee 100644 --- a/test/automation/src/playwrightDriver.ts +++ b/test/automation/src/playwrightDriver.ts @@ -116,14 +116,18 @@ export async function launch(userDataDir: string, _workspacePath: string, codeSe serverLocation = join(codeServerPath, `server.${process.platform === 'win32' ? 'cmd' : 'sh'}`); args.push(`--logsPath=${logsPath}`); - console.log(`Starting built server from '${serverLocation}'`); - console.log(`Storing log files into '${logsPath}'`); + if (verbose) { + console.log(`Starting built server from '${serverLocation}'`); + console.log(`Storing log files into '${logsPath}'`); + } } else { serverLocation = join(root, `resources/server/web.${process.platform === 'win32' ? 'bat' : 'sh'}`); args.push('--logsPath', logsPath); - console.log(`Starting server out of sources from '${serverLocation}'`); - console.log(`Storing log files into '${logsPath}'`); + if (verbose) { + console.log(`Starting server out of sources from '${serverLocation}'`); + console.log(`Storing log files into '${logsPath}'`); + } } server = spawn( diff --git a/test/integration/browser/src/index.ts b/test/integration/browser/src/index.ts index 3a5fbe528b2..2e5909310fb 100644 --- a/test/integration/browser/src/index.ts +++ b/test/integration/browser/src/index.ts @@ -102,15 +102,19 @@ async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.U serverLocation = path.join(process.env.VSCODE_REMOTE_SERVER_PATH, `server.${process.platform === 'win32' ? 'cmd' : 'sh'}`); serverArgs.push(`--logsPath=${logsPath}`); - console.log(`Starting built server from '${serverLocation}'`); - console.log(`Storing log files into '${logsPath}'`); + if (optimist.argv.debug) { + console.log(`Starting built server from '${serverLocation}'`); + console.log(`Storing log files into '${logsPath}'`); + } } else { serverLocation = path.join(root, `resources/server/web.${process.platform === 'win32' ? 'bat' : 'sh'}`); serverArgs.push('--logsPath', logsPath); process.env.VSCODE_DEV = '1'; - console.log(`Starting server out of sources from '${serverLocation}'`); - console.log(`Storing log files into '${logsPath}'`); + if (optimist.argv.debug) { + console.log(`Starting server out of sources from '${serverLocation}'`); + console.log(`Storing log files into '${logsPath}'`); + } } const stdio: StdioOptions = optimist.argv.debug ? 'pipe' : ['ignore', 'pipe', 'ignore'];