adopt server script in integration tests

This commit is contained in:
Martin Aeschlimann 2022-01-19 18:08:04 +01:00
parent ca8d9d1542
commit ad928a4e0f
No known key found for this signature in database
GPG key ID: 2609A01E695523E3
2 changed files with 5 additions and 2 deletions

View file

@ -229,7 +229,8 @@ async function launchServer(options: LaunchOptions) {
let serverLocation: string | undefined;
if (codeServerPath) {
serverLocation = join(codeServerPath, `server.${process.platform === 'win32' ? 'cmd' : 'sh'}`);
const { serverApplicationName } = require(join(codeServerPath, 'product.json'));
serverLocation = join(codeServerPath, 'bin', `${serverApplicationName}${process.platform === 'win32' ? '.cmd' : ''}`);
args.push(`--logsPath=${logsPath}`);
logger.log(`Starting built server from '${serverLocation}'`);

View file

@ -5,6 +5,7 @@
import * as path from 'path';
import * as cp from 'child_process';
import { promises as fs } from 'fs';
import * as playwright from '@playwright/test';
import * as url from 'url';
import * as tmp from 'tmp';
@ -130,7 +131,8 @@ async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.U
let serverLocation: string;
if (process.env.VSCODE_REMOTE_SERVER_PATH) {
serverLocation = path.join(process.env.VSCODE_REMOTE_SERVER_PATH, `server.${process.platform === 'win32' ? 'cmd' : 'sh'}`);
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) {