enable remote smoke tests

This commit is contained in:
Sandeep Somavarapu 2021-02-03 19:20:44 +01:00
parent 55579f367a
commit 066c584405
3 changed files with 15 additions and 10 deletions

View file

@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.54.0",
"distro": "3b4f6074b6501e7e9f09a53dcaffce592d264b77",
"distro": "bc881dcef106ab3d9f62a6fda15b804eef929ef1",
"author": {
"name": "Microsoft Corporation"
},

View file

@ -120,7 +120,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
let child: cp.ChildProcess | undefined;
let connectDriver: typeof connectElectronDriver;
copyExtension(options, 'vscode-notebook-tests');
copyExtension(options.extensionsPath, 'vscode-notebook-tests');
if (options.web) {
await launch(options.userDataDir, options.workspacePath, options.codePath, options.extensionsPath);
@ -150,11 +150,19 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
if (codePath) {
// running against a build: copy the test resolver extension
copyExtension(options, 'vscode-test-resolver');
copyExtension(options.extensionsPath, 'vscode-test-resolver');
}
args.push('--enable-proposed-api=vscode.vscode-test-resolver');
const remoteDataDir = `${options.userDataDir}-server`;
mkdirp.sync(remoteDataDir);
if (codePath) {
// running against a build: copy the test resolver extension into remote extensions dir
const remoteExtensionsDir = path.join(remoteDataDir, 'extensions');
mkdirp.sync(remoteExtensionsDir);
copyExtension(remoteExtensionsDir, 'vscode-notebook-tests');
}
env['TESTRESOLVER_DATA_FOLDER'] = remoteDataDir;
}
@ -186,11 +194,11 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
return connect(connectDriver, child, outPath, handle, options.logger);
}
async function copyExtension(options: SpawnOptions, extId: string): Promise<void> {
const testResolverExtPath = path.join(options.extensionsPath, extId);
if (!fs.existsSync(testResolverExtPath)) {
async function copyExtension(extensionsPath: string, extId: string): Promise<void> {
const dest = path.join(extensionsPath, extId);
if (!fs.existsSync(dest)) {
const orig = path.join(repoPath, 'extensions', extId);
await new Promise((c, e) => ncp(orig, testResolverExtPath, err => err ? e(err) : c()));
await new Promise((c, e) => ncp(orig, dest, err => err ? e(err) : c()));
}
}

View file

@ -23,9 +23,6 @@ export function setup() {
await app.workbench.extensions.waitForExtensionsViewlet();
if (app.remote) {
await app.reload();
}
await app.workbench.quickaccess.runCommand('Smoke Test Check');
await app.workbench.statusbar.waitForStatusbarText('smoke test', 'VS Code Smoke Test Check');
});