2016-04-28 16:15:19 +02:00
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
|
2017-04-26 10:17:59 +02:00
|
|
|
pushd %~dp0\..
|
|
|
|
|
2020-02-05 09:13:21 +01:00
|
|
|
set VSCODEUSERDATADIR=%TEMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2%
|
2020-05-07 08:26:12 +02:00
|
|
|
set VSCODECRASHDIR=%~dp0\..\.build\crashes
|
2021-06-15 08:33:26 +02:00
|
|
|
set VSCODELOGSDIR=%~dp0\..\.build\logs\integration-tests
|
2016-04-29 09:44:54 +02:00
|
|
|
|
2019-09-04 08:55:20 +02:00
|
|
|
:: Figure out which Electron to use for running tests
|
2019-09-02 11:26:26 +02:00
|
|
|
if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
|
2020-05-07 08:26:12 +02:00
|
|
|
:: Run out of sources: no need to compile as code.bat takes care of it
|
2019-11-08 17:21:19 +01:00
|
|
|
chcp 65001
|
2019-09-02 11:26:26 +02:00
|
|
|
set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat
|
2019-11-08 17:21:19 +01:00
|
|
|
set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1
|
2019-09-04 08:55:20 +02:00
|
|
|
|
2020-05-07 08:26:12 +02:00
|
|
|
echo Storing crash reports into '%VSCODECRASHDIR%'.
|
2021-06-15 08:33:26 +02:00
|
|
|
echo Storing log files into '%VSCODELOGSDIR%'.
|
2020-02-04 20:26:12 +01:00
|
|
|
echo Running integration tests out of sources.
|
2019-09-02 11:26:26 +02:00
|
|
|
) else (
|
2019-09-04 08:55:20 +02:00
|
|
|
:: Run from a built: need to compile all test extensions
|
2020-02-13 12:02:15 +01:00
|
|
|
:: because we run extension tests from their source folders
|
|
|
|
:: and the build bundles extensions into .build webpacked
|
2020-02-13 12:26:32 +01:00
|
|
|
call yarn gulp compile-extension:vscode-api-tests^
|
2021-01-19 11:03:56 +01:00
|
|
|
compile-extension:vscode-colorize-tests^
|
2020-02-13 12:26:32 +01:00
|
|
|
compile-extension:markdown-language-features^
|
2020-07-10 09:57:44 +02:00
|
|
|
compile-extension:typescript-language-features^
|
2020-07-29 23:05:36 +02:00
|
|
|
compile-extension:vscode-custom-editor-tests^
|
2020-02-13 12:26:32 +01:00
|
|
|
compile-extension:emmet^
|
|
|
|
compile-extension:css-language-features-server^
|
|
|
|
compile-extension:html-language-features-server^
|
|
|
|
compile-extension:json-language-features-server^
|
2021-04-24 01:17:59 +02:00
|
|
|
compile-extension:git^
|
|
|
|
compile-extension-media
|
2019-09-02 11:26:26 +02:00
|
|
|
|
2020-01-15 16:36:03 +01:00
|
|
|
:: Configuration for more verbose output
|
|
|
|
set VSCODE_CLI=1
|
|
|
|
set ELECTRON_ENABLE_LOGGING=1
|
|
|
|
|
2020-05-07 08:26:12 +02:00
|
|
|
echo Storing crash reports into '%VSCODECRASHDIR%'.
|
2021-06-15 08:33:26 +02:00
|
|
|
echo Storing log files into '%VSCODELOGSDIR%'.
|
2020-02-04 20:26:12 +01:00
|
|
|
echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build.
|
2019-09-02 11:26:26 +02:00
|
|
|
)
|
|
|
|
|
2021-07-01 15:23:32 +02:00
|
|
|
|
|
|
|
:: Tests standalone (AMD)
|
|
|
|
|
2021-02-20 02:22:38 +01:00
|
|
|
call .\scripts\test.bat --runGlob **\*.integrationTest.js %*
|
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2018-10-29 23:23:39 +01:00
|
|
|
|
2021-07-01 15:23:32 +02:00
|
|
|
|
2017-11-15 11:15:41 +01:00
|
|
|
:: Tests in the extension host
|
2019-10-08 18:02:55 +02:00
|
|
|
|
2021-06-15 08:33:26 +02:00
|
|
|
set ALL_PLATFORMS_API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --disable-keytar --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR%
|
2021-02-17 15:09:40 +01:00
|
|
|
|
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
2019-02-12 20:12:44 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2018-01-26 16:16:36 +01:00
|
|
|
|
2021-02-17 15:09:40 +01:00
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testworkspace.code-workspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\workspace-tests %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
2019-02-12 20:12:44 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2017-12-13 01:58:43 +01:00
|
|
|
|
2021-02-17 15:09:40 +01:00
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-colorize-tests\test --extensionDevelopmentPath=%~dp0\..\extensions\vscode-colorize-tests --extensionTestsPath=%~dp0\..\extensions\vscode-colorize-tests\out %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
2021-01-19 11:03:56 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
|
|
|
2021-02-17 15:09:40 +01:00
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\typescript-language-features\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\typescript-language-features --extensionTestsPath=%~dp0\..\extensions\typescript-language-features\out\test\unit %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
2021-01-15 20:19:33 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2020-07-08 02:38:03 +02:00
|
|
|
|
2021-02-17 15:09:40 +01:00
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\markdown-language-features\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\markdown-language-features --extensionTestsPath=%~dp0\..\extensions\markdown-language-features\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
2020-02-10 15:32:59 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
|
|
|
2021-06-15 17:07:53 +02:00
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\emmet\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
2017-12-13 01:58:43 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2016-04-28 16:15:19 +02:00
|
|
|
|
2020-02-05 09:35:22 +01:00
|
|
|
for /f "delims=" %%i in ('node -p "require('fs').realpathSync.native(require('os').tmpdir())"') do set TEMPDIR=%%i
|
|
|
|
set GITWORKSPACE=%TEMPDIR%\git-%RANDOM%
|
2020-02-05 09:13:21 +01:00
|
|
|
mkdir %GITWORKSPACE%
|
2021-02-17 15:09:40 +01:00
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %GITWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test --enable-proposed-api=vscode.git %ALL_PLATFORMS_API_TESTS_EXTRA_ARGS%
|
2020-02-05 09:13:21 +01:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2020-02-04 12:46:15 +01:00
|
|
|
|
2021-07-01 15:23:32 +02:00
|
|
|
|
|
|
|
:: Tests standalone (CommonJS)
|
|
|
|
|
2020-12-18 17:38:23 +01:00
|
|
|
call %~dp0\node-electron.bat %~dp0\..\extensions\css-language-features/server/test/index.js
|
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2020-08-18 12:04:38 +02:00
|
|
|
|
|
|
|
call %~dp0\node-electron.bat %~dp0\..\extensions\html-language-features/server/test/index.js
|
2019-06-24 12:11:26 +02:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2017-11-15 11:15:41 +01:00
|
|
|
|
2017-03-17 18:19:31 +01:00
|
|
|
rmdir /s /q %VSCODEUSERDATADIR%
|
2017-03-17 16:52:31 +01:00
|
|
|
|
2017-04-26 10:17:59 +02:00
|
|
|
popd
|
|
|
|
|
2017-03-07 17:28:16 +01:00
|
|
|
endlocal
|