mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
adopt --server-data-dir
This commit is contained in:
@@ -118,7 +118,6 @@ async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.U
|
||||
const userDataDir = path.join(testDataPath, 'd');
|
||||
|
||||
const env = {
|
||||
VSCODE_AGENT_FOLDER: userDataDir,
|
||||
VSCODE_BROWSER: browserType,
|
||||
...process.env
|
||||
};
|
||||
@@ -126,29 +125,28 @@ async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.U
|
||||
const root = path.join(__dirname, '..', '..', '..', '..');
|
||||
const logsPath = path.join(root, '.build', 'logs', 'integration-tests-browser');
|
||||
|
||||
const serverArgs = ['--browser', 'none', '--driver', 'web', '--enable-proposed-api', '--disable-telemetry'];
|
||||
const serverArgs = ['--driver', 'web', '--enable-proposed-api', '--disable-telemetry', '--server-data-dir', userDataDir];
|
||||
|
||||
let serverLocation: string;
|
||||
if (process.env.VSCODE_REMOTE_SERVER_PATH) {
|
||||
const { serverApplicationName } = require(path.join(process.env.VSCODE_REMOTE_SERVER_PATH, 'product.json'));
|
||||
serverLocation = path.join(process.env.VSCODE_REMOTE_SERVER_PATH, 'bin', `${serverApplicationName}${process.platform === 'win32' ? '.cmd' : ''}`);
|
||||
serverArgs.push(`--logsPath=${logsPath}`);
|
||||
|
||||
if (optimist.argv.debug) {
|
||||
console.log(`Starting built server from '${serverLocation}'`);
|
||||
console.log(`Storing log files into '${logsPath}'`);
|
||||
}
|
||||
} else {
|
||||
serverLocation = path.join(root, `scripts/code-server.${process.platform === 'win32' ? 'bat' : 'sh'}`);
|
||||
serverArgs.push('--logsPath', logsPath);
|
||||
process.env.VSCODE_DEV = '1';
|
||||
|
||||
if (optimist.argv.debug) {
|
||||
console.log(`Starting server out of sources from '${serverLocation}'`);
|
||||
console.log(`Storing log files into '${logsPath}'`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`Storing log files into '${logsPath}'`);
|
||||
serverArgs.push('--logsPath', logsPath);
|
||||
|
||||
const stdio: cp.StdioOptions = optimist.argv.debug ? 'pipe' : ['ignore', 'pipe', 'ignore'];
|
||||
|
||||
let serverProcess = cp.spawn(
|
||||
|
||||
Reference in New Issue
Block a user