move remote and web tests to scripts folder

This commit is contained in:
Martin Aeschlimann
2022-01-21 14:33:34 +01:00
parent 0d8bb5f2ba
commit 3640c1a425
15 changed files with 27 additions and 29 deletions

View File

@@ -86,11 +86,11 @@ jobs:
- name: Run Integration Tests (Browser, Firefox)
timeout-minutes: 20
run: .\resources\server\test\test-web-integration.bat --browser firefox
run: .\scripts\test-web-integration.bat --browser firefox
- name: Run Integration Tests (Remote)
timeout-minutes: 20
run: .\resources\server\test\test-remote-integration.bat
run: .\scripts\test-remote-integration.bat
linux:
name: Linux
@@ -167,12 +167,12 @@ jobs:
- name: Run Integration Tests (Browser, Chromium)
id: browser-integration-tests
run: DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
run: DISPLAY=:10 ./scripts/test-web-integration.sh --browser chromium
- name: Run Integration Tests (Remote)
id: electron-remote-integration-tests
timeout-minutes: 15
run: DISPLAY=:10 ./resources/server/test/test-remote-integration.sh
run: DISPLAY=:10 ./scripts/test-remote-integration.sh
darwin:
name: macOS
@@ -242,11 +242,11 @@ jobs:
run: DISPLAY=:10 ./scripts/test-integration.sh
- name: Run Integration Tests (Browser, Webkit)
run: DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser webkit
run: DISPLAY=:10 ./scripts/test-web-integration.sh --browser webkit
- name: Run Integration Tests (Remote)
timeout-minutes: 15
run: DISPLAY=:10 ./resources/server/test/test-remote-integration.sh
run: DISPLAY=:10 ./scripts/test-remote-integration.sh
hygiene:
name: Hygiene, Layering and Monaco Editor

View File

@@ -208,7 +208,7 @@ steps:
- script: |
set -e
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \
./resources/server/test/test-web-integration.sh --browser webkit
./scripts/test-web-integration.sh --browser webkit
displayName: Run integration tests (Browser, Webkit)
timeoutInMinutes: 10
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
@@ -219,7 +219,7 @@ steps:
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \
./resources/server/test/test-remote-integration.sh
./scripts/test-remote-integration.sh
displayName: Run integration tests (Remote)
timeoutInMinutes: 10
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

View File

@@ -205,7 +205,7 @@ steps:
- script: |
set -e
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
./resources/server/test/test-web-integration.sh --browser chromium
./scripts/test-web-integration.sh --browser chromium
displayName: Run integration tests (Browser, Chromium)
timeoutInMinutes: 10
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
@@ -217,7 +217,7 @@ steps:
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
./resources/server/test/test-remote-integration.sh
./scripts/test-remote-integration.sh
displayName: Run integration tests (Remote)
timeoutInMinutes: 7
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

View File

@@ -189,7 +189,7 @@ steps:
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-web-integration.bat --browser firefox }
exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\scripts\test-web-integration.bat --browser firefox }
displayName: Run integration tests (Browser, Firefox)
timeoutInMinutes: 10
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
@@ -200,7 +200,7 @@ steps:
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
$AppNameShort = $AppProductJson.nameShort
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-remote-integration.bat }
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-remote-integration.bat }
displayName: Run integration tests (Remote)
timeoutInMinutes: 7
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))

View File

@@ -17,7 +17,7 @@ call yarn gulp node
:: Launch Server
FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
call "%NODE%" resources\server\bin-dev\code-server.js %*
call "%NODE%" scripts\code-server.js %*
popd

View File

@@ -50,10 +50,8 @@ if (args['port'] === undefined) {
}
const env = { ...process.env };
env['NODE_ENV'] = 'development';
env['VSCODE_DEV'] = '1';
const entryPoint = path.join(__dirname, '..', '..', '..', 'out', 'server-main.js');
const entryPoint = path.join(__dirname, '..', 'out', 'server-main.js');
startServer();
function startServer() {

View File

@@ -20,7 +20,7 @@ function code() {
NODE_ENV=development \
VSCODE_DEV=1 \
$NODE ./resources/server/bin-dev/code-server.js "$@"
$NODE ./scripts/code-server.js "$@"
}
code "$@"

View File

@@ -13,7 +13,7 @@ call yarn gulp node
:: Launch Server
FOR /F "tokens=*" %%g IN ('node build/lib/node.js') do (SET NODE=%%g)
call "%NODE%" resources\web\bin-dev\code-web-playground.js %*
call "%NODE%" scripts\code-web.js %*
popd

View File

@@ -17,7 +17,7 @@ const remote = require('gulp-remote-retry-src');
const vfs = require('vinyl-fs');
const opn = require('opn');
const APP_ROOT = path.join(__dirname, '..', '..', '..');
const APP_ROOT = path.join(__dirname, '..');
const WEB_DEV_EXTENSIONS_ROOT = path.join(APP_ROOT, '.build', 'builtInWebDevExtensions');
const WEB_PLAYGROUND_VERSION = '0.0.13';

View File

@@ -18,7 +18,7 @@ function code() {
NODE=$(node build/lib/node.js)
$NODE ./resources/web/bin-dev/code-web-playground.js "$@"
$NODE ./scripts/code-web.js "$@"
}
code "$@"

View File

@@ -1,7 +1,7 @@
@echo off
setlocal
pushd %~dp0\..\..\..
pushd %~dp0\..
IF "%~1" == "" (
set AUTHORITY=vscode-remote://test+test/
@@ -20,8 +20,8 @@ IF "%VSCODEUSERDATADIR%" == "" (
)
set REMOTE_VSCODE=%AUTHORITY%%EXT_PATH%
set VSCODECRASHDIR=%~dp0\..\..\..\.build\crashes
set VSCODELOGSDIR=%~dp0\..\..\..\.build\logs\integration-tests-remote
set VSCODECRASHDIR=%~dp0\..\.build\crashes
set VSCODELOGSDIR=%~dp0\..\.build\logs\integration-tests-remote
set TESTRESOLVER_DATA_FOLDER=%TMP%\testresolverdatafolder-%RANDOM%-%TIME:~6,5%
set TESTRESOLVER_LOGS_FOLDER=%VSCODELOGSDIR%\server

View File

@@ -3,11 +3,11 @@ set -e
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
ROOT=$(dirname $(dirname $(dirname $(dirname $(realpath "$0")))))
ROOT=$(dirname $(dirname $(realpath "$0")))
VSCODEUSERDATADIR=`mktemp -d -t 'myuserdatadir'`
TESTRESOLVER_DATA_FOLDER=`mktemp -d -t 'testresolverdatafolder'`
else
ROOT=$(dirname $(dirname $(dirname $(dirname $(readlink -f $0)))))
ROOT=$(dirname $(dirname $(readlink -f $0)))
VSCODEUSERDATADIR=`mktemp -d 2>/dev/null`
TESTRESOLVER_DATA_FOLDER=`mktemp -d 2>/dev/null`
# --disable-dev-shm-usage --use-gl=swiftshader: when run on docker containers where size of /dev/shm

View File

@@ -1,7 +1,7 @@
@echo off
setlocal
pushd %~dp0\..\..\..
pushd %~dp0\..
IF "%~1" == "" (
set AUTHORITY=vscode-remote://test+test/

View File

@@ -3,9 +3,9 @@ set -e
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
ROOT=$(dirname $(dirname $(dirname $(dirname $(realpath "$0")))))
ROOT=$(dirname $(dirname $(realpath "$0")))
else
ROOT=$(dirname $(dirname $(dirname $(dirname $(readlink -f $0)))))
ROOT=$(dirname $(dirname $(readlink -f $0)))
fi
cd $ROOT

View File

@@ -15,7 +15,7 @@ All integration tests run in an Electron instance. You can specify to run the te
## Run (inside browser)
resources/server/test/test-web-integration.[sh|bat] --browser [chromium|webkit] [--debug]
scripts/test-web-integration.[sh|bat] --browser [chromium|webkit] [--debug]
All integration tests run in a browser instance as specified by the command line arguments.