diff --git a/test/automation/src/playwrightDriver.ts b/test/automation/src/playwrightDriver.ts index d7da0ec9f3f..56c1d6de871 100644 --- a/test/automation/src/playwrightDriver.ts +++ b/test/automation/src/playwrightDriver.ts @@ -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}'`); diff --git a/test/integration/browser/src/index.ts b/test/integration/browser/src/index.ts index 818aaae5418..5116646ddae 100644 --- a/test/integration/browser/src/index.ts +++ b/test/integration/browser/src/index.ts @@ -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) {