mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
Parcel update and CI improvements (#136830)
* 🆙 product * 🆙 parcel/watcher * 🆙 parcel/watcher * tests - separate remote logs from others * store server logs too * more tweaks * fix name * error when 10s passed
This commit is contained in:
parent
42f10bb643
commit
bef4dba21f
|
@ -233,7 +233,7 @@ steps:
|
|||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
|
||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \
|
||||
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME" --remote --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests
|
||||
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME" --remote --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests-remote
|
||||
timeoutInMinutes: 5
|
||||
displayName: Run smoke tests (Remote)
|
||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
|
|
@ -220,7 +220,7 @@ steps:
|
|||
set -e
|
||||
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
||||
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests
|
||||
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests-remote
|
||||
timeoutInMinutes: 5
|
||||
displayName: Run smoke tests (Remote)
|
||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||
|
|
|
@ -216,7 +216,7 @@ steps:
|
|||
$ErrorActionPreference = "Stop"
|
||||
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"
|
||||
exec { yarn smoketest-no-compile --build "$AppRoot" --remote }
|
||||
exec { yarn smoketest-no-compile --build "$AppRoot" --remote --screenshots $(Build.SourcesDirectory)\.build\logs\smoke-tests-remote }
|
||||
displayName: Run smoke tests (Remote)
|
||||
timeoutInMinutes: 5
|
||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
|
||||
|
|
|
@ -83,6 +83,10 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
const commandArgs = ['--port=0', '--disable-telemetry'];
|
||||
const env = getNewEnv();
|
||||
const remoteDataDir = process.env['TESTRESOLVER_DATA_FOLDER'] || path.join(os.homedir(), serverDataFolderName || `${dataFolderName}-testresolver`);
|
||||
const logsDir = process.env['TESTRESOLVER_LOGS_FOLDER'];
|
||||
if (logsDir) {
|
||||
commandArgs.push('--logsPath', logsDir);
|
||||
}
|
||||
|
||||
env['VSCODE_AGENT_FOLDER'] = remoteDataDir;
|
||||
outputChannel.appendLine(`Using data folder at ${remoteDataDir}`);
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@microsoft/applicationinsights-web": "^2.6.4",
|
||||
"@parcel/watcher": "2.0.0",
|
||||
"@parcel/watcher": "2.0.1",
|
||||
"@vscode/sqlite3": "4.0.12",
|
||||
"@vscode/vscode-languagedetection": "1.0.21",
|
||||
"applicationinsights": "1.0.8",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"@microsoft/applicationinsights-web": "^2.6.4",
|
||||
"@parcel/watcher": "2.0.0",
|
||||
"@parcel/watcher": "2.0.1",
|
||||
"@vscode/vscode-languagedetection": "1.0.21",
|
||||
"applicationinsights": "1.0.8",
|
||||
"cookie": "^0.4.0",
|
||||
|
|
|
@ -83,10 +83,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.4.tgz#40e1c0ad20743fcee1604a7df2c57faf0aa1af87"
|
||||
integrity sha512-Ot53G927ykMF8cQ3/zq4foZtdk+Tt1YpX7aUTHxBU7UHNdkEiBvBfZSq+rnlUmKCJ19VatwPG4mNzvcGpBj4og==
|
||||
|
||||
"@parcel/watcher@2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.0.tgz#ebe992a4838b35c3da9a568eb95a71cb26ddf551"
|
||||
integrity sha512-ByalKmRRXNNAhwZ0X1r0XeIhh1jG8zgdlvjgHk9ZV3YxiersEGNQkwew+RfqJbIL4gOJfvC2ey6lg5kaeRainw==
|
||||
"@parcel/watcher@2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.1.tgz#ec4bb6c43d9588a1ffd3d2abe6df5b501463c62d"
|
||||
integrity sha512-XegFF4L8sFn1RzU5KKOZxXUuzgOSwd6+X2ez3Cy6MVhYMbiLZ1moceMTqDhuT3N8DNbdumK3zP1wojsIsnX40w==
|
||||
dependencies:
|
||||
node-addon-api "^3.2.1"
|
||||
node-gyp-build "^4.3.0"
|
||||
|
|
|
@ -21,8 +21,9 @@ IF "%VSCODEUSERDATADIR%" == "" (
|
|||
|
||||
set REMOTE_VSCODE=%AUTHORITY%%EXT_PATH%
|
||||
set VSCODECRASHDIR=%~dp0\..\..\..\.build\crashes
|
||||
set VSCODELOGSDIR=%~dp0\..\..\..\.build\logs\remote-integration-tests
|
||||
set VSCODELOGSDIR=%~dp0\..\..\..\.build\logs\integration-tests-remote
|
||||
set TESTRESOLVER_DATA_FOLDER=%TMP%\testresolverdatafolder-%RANDOM%-%TIME:~6,5%
|
||||
set TESTRESOLVER_LOGS_FOLDER=%VSCODELOGSDIR%\server
|
||||
|
||||
if "%VSCODE_REMOTE_SERVER_PATH%"=="" (
|
||||
echo "Using remote server out of sources for integration tests"
|
||||
|
|
|
@ -29,7 +29,7 @@ fi
|
|||
|
||||
export REMOTE_VSCODE=$AUTHORITY$EXT_PATH
|
||||
VSCODECRASHDIR=$ROOT/.build/crashes
|
||||
VSCODELOGSDIR=$ROOT/.build/logs/remote-integration-tests
|
||||
VSCODELOGSDIR=$ROOT/.build/logs/integration-tests-remote
|
||||
|
||||
# Figure out which Electron to use for running tests
|
||||
if [ -z "$INTEGRATION_TEST_ELECTRON_PATH" ]
|
||||
|
@ -74,6 +74,7 @@ else
|
|||
fi
|
||||
|
||||
export TESTRESOLVER_DATA_FOLDER=$TESTRESOLVER_DATA_FOLDER
|
||||
export TESTRESOLVER_LOGS_FOLDER=$VSCODELOGSDIR/server
|
||||
|
||||
# Figure out which remote server to use for running tests
|
||||
if [ -z "$VSCODE_REMOTE_SERVER_PATH" ]
|
||||
|
|
|
@ -26,6 +26,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
|
|||
compile-extension:markdown-language-features^
|
||||
compile-extension:typescript-language-features^
|
||||
compile-extension:vscode-custom-editor-tests^
|
||||
compile-extension:vscode-notebook-tests^
|
||||
compile-extension:emmet^
|
||||
compile-extension:css-language-features-server^
|
||||
compile-extension:html-language-features-server^
|
||||
|
|
|
@ -32,6 +32,7 @@ else
|
|||
yarn gulp compile-extension:vscode-api-tests \
|
||||
compile-extension:vscode-colorize-tests \
|
||||
compile-extension:vscode-custom-editor-tests \
|
||||
compile-extension:vscode-notebook-tests \
|
||||
compile-extension:markdown-language-features \
|
||||
compile-extension:typescript-language-features \
|
||||
compile-extension:emmet \
|
||||
|
|
|
@ -362,6 +362,8 @@ export class LocalProcessExtensionHost implements IExtensionHost {
|
|||
let startupTimeoutHandle: any;
|
||||
if (!this._environmentService.isBuilt && !this._environmentService.remoteAuthority || this._isExtensionDevHost) {
|
||||
startupTimeoutHandle = setTimeout(() => {
|
||||
this._logService.error(`[LocalProcessExtensionHost]: Extension host did not start in 10 seconds (debugBrk: ${this._isExtensionDevDebugBrk})`);
|
||||
|
||||
const msg = this._isExtensionDevDebugBrk
|
||||
? nls.localize('extensionHost.startupFailDebug', "Extension host did not start in 10 seconds, it might be stopped on the first line and needs a debugger to continue.")
|
||||
: nls.localize('extensionHost.startupFail', "Extension host did not start in 10 seconds, that might be a problem.");
|
||||
|
|
|
@ -128,6 +128,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
|||
|
||||
const env = { ...process.env };
|
||||
const codePath = options.codePath;
|
||||
const logsPath = path.join(repoPath, '.build', 'logs', options.remote ? 'smoke-tests-remote' : 'smoke-tests');
|
||||
const outPath = codePath ? getBuildOutPath(codePath) : getDevOutPath();
|
||||
|
||||
const args = [
|
||||
|
@ -142,7 +143,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
|||
'--disable-workspace-trust',
|
||||
`--extensions-dir=${options.extensionsPath}`,
|
||||
`--user-data-dir=${options.userDataDir}`,
|
||||
`--logsPath=${path.join(repoPath, '.build', 'logs', 'smoke-tests')}`,
|
||||
`--logsPath=${logsPath}`,
|
||||
'--driver', handle
|
||||
];
|
||||
|
||||
|
@ -170,6 +171,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
|||
}
|
||||
|
||||
env['TESTRESOLVER_DATA_FOLDER'] = remoteDataDir;
|
||||
env['TESTRESOLVER_LOGS_FOLDER'] = path.join(logsPath, 'server');
|
||||
}
|
||||
|
||||
const spawnOptions: cp.SpawnOptions = { env };
|
||||
|
|
|
@ -163,7 +163,11 @@ if (!opts.web) {
|
|||
quality = Quality.Stable;
|
||||
}
|
||||
|
||||
console.log(`Running desktop smoke tests against ${electronPath}`);
|
||||
if (opts.remote) {
|
||||
console.log(`Running desktop remote smoke tests against ${electronPath}`);
|
||||
} else {
|
||||
console.log(`Running desktop smoke tests against ${electronPath}`);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -417,10 +417,10 @@
|
|||
dependencies:
|
||||
"@octokit/openapi-types" "^10.2.2"
|
||||
|
||||
"@parcel/watcher@2.0.0":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.0.tgz#ebe992a4838b35c3da9a568eb95a71cb26ddf551"
|
||||
integrity sha512-ByalKmRRXNNAhwZ0X1r0XeIhh1jG8zgdlvjgHk9ZV3YxiersEGNQkwew+RfqJbIL4gOJfvC2ey6lg5kaeRainw==
|
||||
"@parcel/watcher@2.0.1":
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.1.tgz#ec4bb6c43d9588a1ffd3d2abe6df5b501463c62d"
|
||||
integrity sha512-XegFF4L8sFn1RzU5KKOZxXUuzgOSwd6+X2ez3Cy6MVhYMbiLZ1moceMTqDhuT3N8DNbdumK3zP1wojsIsnX40w==
|
||||
dependencies:
|
||||
node-addon-api "^3.2.1"
|
||||
node-gyp-build "^4.3.0"
|
||||
|
|
Loading…
Reference in a new issue