Merge remote-tracking branch 'origin/master' into tyriar/puppeteer

This commit is contained in:
Daniel Imms
2019-07-15 10:34:58 -07:00
173 changed files with 3112 additions and 1763 deletions

View File

@@ -156,7 +156,12 @@ async function setupRepository(): Promise<void> {
console.log('*** Copying test project repository:', opts['test-repo']);
rimraf.sync(workspacePath);
// not platform friendly
cp.execSync(`cp -R "${opts['test-repo']}" "${workspacePath}"`);
if (process.platform === 'win32') {
cp.execSync(`xcopy /E "${opts['test-repo']}" "${workspacePath}"\\*`);
} else {
cp.execSync(`cp -R "${opts['test-repo']}" "${workspacePath}"`);
}
} else {
if (!fs.existsSync(workspacePath)) {
console.log('*** Cloning test project repository...');

View File

@@ -12,6 +12,7 @@ import { tmpName } from 'tmp';
import { IDriver, connect as connectDriver, IDisposable, IElement, Thenable } from './puppeteer-driver';
import { Logger } from '../logger';
import { ncp } from 'ncp';
import { URI } from 'vscode-uri';
const repoPath = path.join(__dirname, '../../../..');
@@ -129,11 +130,8 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
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}`,
);
args[0] = `--${options.workspacePath.endsWith('.code-workspace') ? 'file' : 'folder'}-uri=vscode-remote://test+test/${URI.file(options.workspacePath).path}`;
if (codePath) {
// running against a build: copy the test resolver extension
const testResolverExtPath = path.join(options.extensionsPath, 'vscode-test-resolver');