diff options
author | Martin Aeschlimann <martinae@microsoft.com> | 2022-01-21 16:33:34 +0300 |
---|---|---|
committer | Martin Aeschlimann <martinae@microsoft.com> | 2022-01-21 16:33:34 +0300 |
commit | 3640c1a425713e905f7898917cd15cc077204697 (patch) | |
tree | 2c4dd5cee4cd6f34901430cc608eb7b9a8f255ea | |
parent | 0d8bb5f2baadc73f6231cf73030fe819d251ef21 (diff) |
move remote and web tests to scripts folder
-rw-r--r-- | .github/workflows/ci.yml | 12 | ||||
-rw-r--r-- | build/azure-pipelines/darwin/product-build-darwin.yml | 4 | ||||
-rw-r--r-- | build/azure-pipelines/linux/product-build-linux.yml | 4 | ||||
-rw-r--r-- | build/azure-pipelines/win32/product-build-win32.yml | 4 | ||||
-rw-r--r-- | scripts/code-server.bat | 2 | ||||
-rw-r--r-- | scripts/code-server.js (renamed from resources/server/bin-dev/code-server.js) | 4 | ||||
-rwxr-xr-x | scripts/code-server.sh | 2 | ||||
-rw-r--r-- | scripts/code-web.bat | 2 | ||||
-rw-r--r-- | scripts/code-web.js (renamed from resources/web/bin-dev/code-web-playground.js) | 2 | ||||
-rwxr-xr-x | scripts/code-web.sh | 2 | ||||
-rw-r--r-- | scripts/test-remote-integration.bat (renamed from resources/server/test/test-remote-integration.bat) | 6 | ||||
-rwxr-xr-x | scripts/test-remote-integration.sh (renamed from resources/server/test/test-remote-integration.sh) | 4 | ||||
-rw-r--r-- | scripts/test-web-integration.bat (renamed from resources/server/test/test-web-integration.bat) | 2 | ||||
-rwxr-xr-x | scripts/test-web-integration.sh (renamed from resources/server/test/test-web-integration.sh) | 4 | ||||
-rw-r--r-- | test/integration/browser/README.md | 2 |
15 files changed, 27 insertions, 29 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9cf8c91533..9b06ac2e1a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/build/azure-pipelines/darwin/product-build-darwin.yml b/build/azure-pipelines/darwin/product-build-darwin.yml index cc74e6b7ca3..a878dd4b1be 100644 --- a/build/azure-pipelines/darwin/product-build-darwin.yml +++ b/build/azure-pipelines/darwin/product-build-darwin.yml @@ -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')) diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index 4e4c7ab564f..b158bc5761d 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -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')) diff --git a/build/azure-pipelines/win32/product-build-win32.yml b/build/azure-pipelines/win32/product-build-win32.yml index a5a07223d23..c3db4e58f4c 100644 --- a/build/azure-pipelines/win32/product-build-win32.yml +++ b/build/azure-pipelines/win32/product-build-win32.yml @@ -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')) diff --git a/scripts/code-server.bat b/scripts/code-server.bat index 6c3bf915366..549f69aeddd 100644 --- a/scripts/code-server.bat +++ b/scripts/code-server.bat @@ -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 diff --git a/resources/server/bin-dev/code-server.js b/scripts/code-server.js index 26b93a03465..363c3dd6388 100644 --- a/resources/server/bin-dev/code-server.js +++ b/scripts/code-server.js @@ -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() { diff --git a/scripts/code-server.sh b/scripts/code-server.sh index b1c266ec2e4..e932e106b38 100755 --- a/scripts/code-server.sh +++ b/scripts/code-server.sh @@ -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 "$@" diff --git a/scripts/code-web.bat b/scripts/code-web.bat index 5ad704aea78..5775eccf3a1 100644 --- a/scripts/code-web.bat +++ b/scripts/code-web.bat @@ -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 diff --git a/resources/web/bin-dev/code-web-playground.js b/scripts/code-web.js index 57a3e4d8d26..345d3538f39 100644 --- a/resources/web/bin-dev/code-web-playground.js +++ b/scripts/code-web.js @@ -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'; diff --git a/scripts/code-web.sh b/scripts/code-web.sh index dd32d01117e..fe468f37fb7 100755 --- a/scripts/code-web.sh +++ b/scripts/code-web.sh @@ -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 "$@" diff --git a/resources/server/test/test-remote-integration.bat b/scripts/test-remote-integration.bat index c31dff424d2..f67c213048a 100644 --- a/resources/server/test/test-remote-integration.bat +++ b/scripts/test-remote-integration.bat @@ -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 diff --git a/resources/server/test/test-remote-integration.sh b/scripts/test-remote-integration.sh index 71fee7327b4..066e136aa2c 100755 --- a/resources/server/test/test-remote-integration.sh +++ b/scripts/test-remote-integration.sh @@ -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 diff --git a/resources/server/test/test-web-integration.bat b/scripts/test-web-integration.bat index d063276409b..68c6a84eba2 100644 --- a/resources/server/test/test-web-integration.bat +++ b/scripts/test-web-integration.bat @@ -1,7 +1,7 @@ @echo off setlocal -pushd %~dp0\..\..\.. +pushd %~dp0\.. IF "%~1" == "" ( set AUTHORITY=vscode-remote://test+test/ diff --git a/resources/server/test/test-web-integration.sh b/scripts/test-web-integration.sh index 8c6962b4244..3c96fafe751 100755 --- a/resources/server/test/test-web-integration.sh +++ b/scripts/test-web-integration.sh @@ -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 diff --git a/test/integration/browser/README.md b/test/integration/browser/README.md index 842d3b1eea8..34107241f8e 100644 --- a/test/integration/browser/README.md +++ b/test/integration/browser/README.md @@ -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. |