smoke - allow to enable verbose vscode logs and enable for now

This commit is contained in:
Benjamin Pasero 2022-04-06 10:41:15 +02:00
parent bf63ea1932
commit 18377e6ee2
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65
8 changed files with 42 additions and 21 deletions

View file

@ -245,9 +245,9 @@ steps:
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
yarn smoketest-no-compile --tracing --build "$APP_ROOT/$APP_NAME"
# Increased timeout because this test downloads stable code
timeoutInMinutes: 20
yarn smoketest-no-compile --verbose --tracing --build "$APP_ROOT/$APP_NAME"
# TODO@bpasero reduce timeout and remove --verbose when done
timeoutInMinutes: 60
displayName: Run smoke tests (Electron)
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
@ -256,8 +256,9 @@ steps:
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --tracing --remote --build "$APP_ROOT/$APP_NAME"
timeoutInMinutes: 10
yarn smoketest-no-compile --verbose --tracing --remote --build "$APP_ROOT/$APP_NAME"
# TODO@bpasero reduce timeout and remove --verbose when done
timeoutInMinutes: 60
displayName: Run smoke tests (Remote)
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

View file

@ -267,9 +267,9 @@ steps:
- script: |
set -e
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
yarn smoketest-no-compile --tracing --build "$APP_PATH"
# Increased timeout because this test downloads stable code
timeoutInMinutes: 20
yarn smoketest-no-compile --verbose --tracing --build "$APP_PATH"
# TODO@bpasero reduce timeout and remove --verbose when done
timeoutInMinutes: 60
displayName: Run smoke tests (Electron)
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
@ -277,8 +277,9 @@ steps:
set -e
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
timeoutInMinutes: 10
yarn smoketest-no-compile --verbose --tracing --remote --build "$APP_PATH"
# TODO@bpasero reduce timeout and remove --verbose when done
timeoutInMinutes: 60
displayName: Run smoke tests (Remote)
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

View file

@ -229,10 +229,11 @@ steps:
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
exec { yarn smoketest-no-compile --tracing --build "$AppRoot" }
exec { yarn smoketest-no-compile --verbose --tracing --build "$AppRoot" }
displayName: Run smoke tests (Electron)
# Increased timeout because this test downloads stable code
timeoutInMinutes: 20
# TODO@bpasero reduce timeout and remove --verbose when done
timeoutInMinutes: 60
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
- powershell: |
@ -240,9 +241,10 @@ steps:
$ErrorActionPreference = "Stop"
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"
exec { yarn smoketest-no-compile --tracing --remote --build "$AppRoot" }
exec { yarn smoketest-no-compile --verbose --tracing --remote --build "$AppRoot" }
displayName: Run smoke tests (Remote)
timeoutInMinutes: 10
# TODO@bpasero reduce timeout and remove --verbose when done
timeoutInMinutes: 60
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
- powershell: |

View file

@ -41,7 +41,7 @@ const isSupportedForCmd = (optionId: keyof RemoteParsedArgs) => {
case 'extensions-dir':
case 'export-default-configuration':
case 'install-source':
case 'driver':
case 'enable-smoke-test-driver':
case 'extensions-download-dir':
case 'builtin-extensions-dir':
case 'telemetry':

View file

@ -31,7 +31,7 @@ export const serverOptions: OptionDescriptions<ServerParsedArgs> = {
/* ----- vs code options --- -- */
'user-data-dir': OPTIONS['user-data-dir'],
'driver': OPTIONS['driver'],
'enable-smoke-test-driver': OPTIONS['enable-smoke-test-driver'],
'disable-telemetry': OPTIONS['disable-telemetry'],
'disable-workspace-trust': OPTIONS['disable-workspace-trust'],
'file-watcher-polling': { type: 'string', deprecates: ['fileWatcherPolling'] },
@ -140,7 +140,7 @@ export interface ServerParsedArgs {
'user-data-dir'?: string;
driver?: string;
'enable-smoke-test-driver'?: boolean;
'disable-telemetry'?: boolean;
'file-watcher-polling'?: string;

View file

@ -260,7 +260,7 @@ export class WebClientServer {
}
let _wrapWebWorkerExtHostInIframe: undefined | false = undefined;
if (this._environmentService.driverHandle) {
if (this._environmentService.args['enable-smoke-test-driver']) {
// integration tests run at a time when the built output is not yet published to the CDN
// so we must disable the iframe wrapping because the iframe URL will give a 404
_wrapWebWorkerExtHostInIframe = false;
@ -279,7 +279,7 @@ export class WebClientServer {
.replace('{{WORKBENCH_WEB_CONFIGURATION}}', escapeAttribute(JSON.stringify({
remoteAuthority,
_wrapWebWorkerExtHostInIframe,
developmentOptions: { enableSmokeTestDriver: this._environmentService.driverHandle === 'web' ? true : undefined },
developmentOptions: { enableSmokeTestDriver: this._environmentService.args['enable-smoke-test-driver'] ? true : undefined },
settingsSyncOptions: !this._environmentService.isBuilt && this._environmentService.args['enable-sync'] ? { enabled: true } : undefined,
enableWorkspaceTrust: !this._environmentService.args['disable-workspace-trust'],
folderUri: resolveWorkspaceURI(this._environmentService.args['default-folder']),

View file

@ -43,6 +43,10 @@ export async function resolveElectronConfiguration(options: LaunchOptions): Prom
`--logsPath=${logsPath}`
];
if (options.verbose) {
args.push('--verbose');
}
if (process.platform === 'linux') {
args.push('--disable-gpu'); // Linux has trouble in VMs to render properly with GPU enabled
}

View file

@ -42,12 +42,26 @@ async function launchServer(options: LaunchOptions) {
const codeServerPath = codePath ?? process.env.VSCODE_REMOTE_SERVER_PATH;
const agentFolder = userDataDir;
await measureAndLog(promisify(mkdir)(agentFolder), `mkdir(${agentFolder})`, logger);
const env = {
VSCODE_REMOTE_SERVER_PATH: codeServerPath,
...process.env
};
const args = ['--disable-telemetry', '--disable-workspace-trust', '--port', `${port++}`, '--driver', 'web', '--extensions-dir', extensionsPath, '--server-data-dir', agentFolder, '--accept-server-license-terms'];
const args = [
'--disable-telemetry',
'--disable-workspace-trust',
'--port', `${port++}`,
'--enable-smoke-test-driver',
'--extensions-dir', extensionsPath,
'--server-data-dir', agentFolder,
'--accept-server-license-terms',
'--logsPath', logsPath
];
if (options.verbose) {
args.push('--log', 'trace');
}
let serverLocation: string | undefined;
if (codeServerPath) {
@ -62,7 +76,6 @@ async function launchServer(options: LaunchOptions) {
}
logger.log(`Storing log files into '${logsPath}'`);
args.push('--logsPath', logsPath);
logger.log(`Command line: '${serverLocation}' ${args.join(' ')}`);
const serverProcess = spawn(