From 1b2f1980c40636c2ac76a99275333c720b496e5b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 11 Apr 2018 12:20:37 +0200 Subject: [PATCH] forward extraArgs to app --- test/smoke/src/application.ts | 3 ++- test/smoke/src/vscode/code.ts | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/test/smoke/src/application.ts b/test/smoke/src/application.ts index d646c6c6e6a..c656696eec6 100644 --- a/test/smoke/src/application.ts +++ b/test/smoke/src/application.ts @@ -119,7 +119,8 @@ export class SpectronApplication { workspacePath: workspaceOrFolder, userDataDir: this.options.userDataDir, extensionsPath: this.options.extensionsPath, - verbose: this.options.verbose + verbose: this.options.verbose, + extraArgs }); const driver = new CodeDriver(this.codeInstance.driver, this.options.verbose); diff --git a/test/smoke/src/vscode/code.ts b/test/smoke/src/vscode/code.ts index b7604d04e4a..a5e0110b796 100644 --- a/test/smoke/src/vscode/code.ts +++ b/test/smoke/src/vscode/code.ts @@ -72,14 +72,6 @@ export class Code { } } -export interface SpawnOptions { - codePath?: string; - workspacePath: string; - userDataDir: string; - extensionsPath: string; - verbose: boolean; -} - export async function connect(child: cp.ChildProcess, outPath: string, handlePath: string): Promise { let errCount = 0; @@ -103,6 +95,15 @@ export async function connect(child: cp.ChildProcess, outPath: string, handlePat const instances = new Set(); process.once('exit', () => instances.forEach(code => code.kill())); +export interface SpawnOptions { + codePath?: string; + workspacePath: string; + userDataDir: string; + extensionsPath: string; + verbose: boolean; + extraArgs?: string[]; +} + export async function spawn(options: SpawnOptions): Promise { const codePath = options.codePath; const electronPath = codePath ? getBuildElectronPath(codePath) : getDevElectronPath(); @@ -126,6 +127,10 @@ export async function spawn(options: SpawnOptions): Promise { args.unshift(repoPath); } + if (options.extraArgs) { + args.push(...options.extraArgs); + } + const spawnOptions: cp.SpawnOptions = {}; if (options.verbose) { -- GitLab