mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-04 07:15:54 +01:00
Enable automated smoketests on Windows (#128224)
This commit is contained in:
@@ -97,11 +97,9 @@ export interface SpawnOptions {
|
||||
verbose?: boolean;
|
||||
extraArgs?: string[];
|
||||
log?: string;
|
||||
/** Run in the test resolver */
|
||||
remote?: boolean;
|
||||
/** Run in the web */
|
||||
web?: boolean;
|
||||
/** A specific browser to use (requires web: true) */
|
||||
headless?: boolean;
|
||||
browser?: 'chromium' | 'webkit' | 'firefox';
|
||||
}
|
||||
|
||||
@@ -124,7 +122,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
|
||||
if (options.web) {
|
||||
await launch(options.userDataDir, options.workspacePath, options.codePath, options.extensionsPath, Boolean(options.verbose));
|
||||
connectDriver = connectPlaywrightDriver.bind(connectPlaywrightDriver, options.browser);
|
||||
connectDriver = connectPlaywrightDriver.bind(connectPlaywrightDriver, options);
|
||||
return connect(connectDriver, child, '', handle, options.logger);
|
||||
}
|
||||
|
||||
@@ -174,6 +172,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
env['TESTRESOLVER_DATA_FOLDER'] = remoteDataDir;
|
||||
}
|
||||
|
||||
const spawnOptions: cp.SpawnOptions = { env };
|
||||
|
||||
args.push('--enable-proposed-api=vscode.vscode-notebook-tests');
|
||||
|
||||
@@ -183,6 +182,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
|
||||
if (options.verbose) {
|
||||
args.push('--driver-verbose');
|
||||
spawnOptions.stdio = ['ignore', 'inherit', 'inherit'];
|
||||
}
|
||||
|
||||
if (options.log) {
|
||||
@@ -194,7 +194,6 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
}
|
||||
|
||||
const electronPath = codePath ? getBuildElectronPath(codePath) : getDevElectronPath();
|
||||
const spawnOptions: cp.SpawnOptions = { env };
|
||||
child = cp.spawn(electronPath, args, spawnOptions);
|
||||
instances.add(child);
|
||||
child.once('exit', () => instances.delete(child!));
|
||||
|
||||
Reference in New Issue
Block a user