From 4cd50470733dfaaf9cd3f2ee863cef89fadde4b2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 4 Sep 2019 08:55:20 +0200 Subject: [PATCH] build :lipstick: --- build/azure-pipelines/darwin/product-build-darwin.yml | 3 +++ build/azure-pipelines/linux/product-build-linux.yml | 3 +++ build/azure-pipelines/win32/product-build-win32.yml | 3 +++ extensions/vscode-test-resolver/src/extension.ts | 2 +- scripts/test-integration.bat | 9 ++++++--- scripts/test-integration.sh | 8 +++++--- 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml index 4595281f508..71dea8f381d 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -102,6 +102,9 @@ steps: condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) - script: | + # Figure out the full absolute path of the product we just built + # including the remote server and configure the integration tests + # to run with these builds instead of running out of sources. set -e APP_ROOT=$(agent.builddirectory)/VSCode-darwin APP_NAME="`ls $APP_ROOT | head -n 1`" diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index 32ff5710091..0d01ba8a608 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -105,6 +105,9 @@ steps: condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) - script: | + # Figure out the full absolute path of the product we just built + # including the remote server and configure the integration tests + # to run with these builds instead of running out of sources. set -e APP_ROOT=$(agent.builddirectory)/VSCode-linux-x64 APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName") diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml index 2785923c587..ae36c8cbe84 100644 --- a/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -113,6 +113,9 @@ steps: condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) - powershell: | + # Figure out the full absolute path of the product we just built + # including the remote server and configure the integration tests + # to run with these builds instead of running out of sources. . build/azure-pipelines/win32/exec.ps1 $ErrorActionPreference = "Stop" $AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)" diff --git a/extensions/vscode-test-resolver/src/extension.ts b/extensions/vscode-test-resolver/src/extension.ts index cb562bf3896..64734212d79 100644 --- a/extensions/vscode-test-resolver/src/extension.ts +++ b/extensions/vscode-test-resolver/src/extension.ts @@ -91,7 +91,7 @@ export function activate(context: vscode.ExtensionContext) { extHostProcess = cp.spawn(serverCommandPath, commandArgs, { env, cwd: vscodePath }); } else { const serverCommand = process.platform === 'win32' ? 'server.cmd' : 'server.sh'; - let serverLocation = env['VSCODE_REMOTE_SERVER_PATH']; // support environment + let serverLocation = env['VSCODE_REMOTE_SERVER_PATH']; // support environment variable to specify location of server on disk if (!serverLocation) { const serverBin = path.join(remoteDataDir, 'bin'); progress.report({ message: 'Installing VSCode Server' }); diff --git a/scripts/test-integration.bat b/scripts/test-integration.bat index 280bc476ebe..d557a24edaa 100644 --- a/scripts/test-integration.bat +++ b/scripts/test-integration.bat @@ -5,11 +5,14 @@ pushd %~dp0\.. set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5% +:: Figure out which Electron to use for running tests if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( - :: code.bat makes sure Test Extensions are compiled + :: Run out of sources: no need to compile as code.sh takes care of it set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat + + echo "Running integration tests out of sources." ) else ( - :: Compile Test Extensions + :: Run from a built: need to compile all test extensions call yarn gulp compile-extension:vscode-api-tests call yarn gulp compile-extension:vscode-colorize-tests call yarn gulp compile-extension:markdown-language-features @@ -18,7 +21,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( call yarn gulp compile-extension:html-language-features-server call yarn gulp compile-extension:json-language-features-server - echo "Using %INTEGRATION_TEST_ELECTRON_PATH% as Electron path" + echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build." ) :: Integration & performance tests in AMD diff --git a/scripts/test-integration.sh b/scripts/test-integration.sh index 0bcbcee72f7..0d236609708 100755 --- a/scripts/test-integration.sh +++ b/scripts/test-integration.sh @@ -15,10 +15,12 @@ cd $ROOT # Figure out which Electron to use for running tests if [ -z "$INTEGRATION_TEST_ELECTRON_PATH" ] then - # code.sh makes sure Test Extensions are compiled + # Run out of sources: no need to compile as code.sh takes care of it INTEGRATION_TEST_ELECTRON_PATH="./scripts/code.sh" + + echo "Running integration tests out of sources." else - # Compile Test Extensions + # Run from a built: need to compile all test extensions yarn gulp compile-extension:vscode-api-tests yarn gulp compile-extension:vscode-colorize-tests yarn gulp compile-extension:markdown-language-features @@ -27,7 +29,7 @@ else yarn gulp compile-extension:html-language-features-server yarn gulp compile-extension:json-language-features-server - echo "Using $INTEGRATION_TEST_ELECTRON_PATH as Electron path" + echo "Running integration tests with '$INTEGRATION_TEST_ELECTRON_PATH' as build." fi # Integration tests in AMD