diff --git a/test/smoke/src/application.ts b/test/smoke/src/application.ts index e3f3a6d76c5..58e5b301a2c 100644 --- a/test/smoke/src/application.ts +++ b/test/smoke/src/application.ts @@ -120,6 +120,7 @@ export class Application { verbose: this.options.verbose, log: this.options.log, extraArgs, + remote: this.options.remote }); this._workbench = new Workbench(this._code, this.userDataPath); diff --git a/test/smoke/src/main.ts b/test/smoke/src/main.ts index 238d72af866..21a0fe252a1 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/main.ts @@ -50,7 +50,8 @@ const opts = minimist(args, { 'log' ], boolean: [ - 'verbose' + 'verbose', + 'remote' ], default: { verbose: false @@ -204,7 +205,8 @@ function createOptions(): ApplicationOptions { logger: new MultiLogger(loggers), verbose: opts.verbose, log, - screenshotsPath + screenshotsPath, + remote: opts.remote }; } diff --git a/test/smoke/src/vscode/code.ts b/test/smoke/src/vscode/code.ts index e84d9d25701..e657d0825f5 100644 --- a/test/smoke/src/vscode/code.ts +++ b/test/smoke/src/vscode/code.ts @@ -90,6 +90,7 @@ export interface SpawnOptions { verbose?: boolean; extraArgs?: string[]; log?: string; + remote?: boolean; } async function createDriverHandle(): Promise { @@ -120,6 +121,15 @@ export async function spawn(options: SpawnOptions): Promise { '--driver', handle ]; + if (options.remote) { + // Replace workspace path with URI + args.shift(); + args.push( + `--${options.workspacePath.endsWith('.code-workspace') ? 'file' : 'folder'}-uri`, + `vscode-remote://test+test${options.workspacePath}`, + ); + } + if (!codePath) { args.unshift(repoPath); }