2016-04-28 14:15:19 +00:00
|
|
|
@echo off
|
|
|
|
setlocal
|
|
|
|
|
2017-04-26 08:17:59 +00:00
|
|
|
pushd %~dp0\..
|
|
|
|
|
2020-02-05 08:13:21 +00:00
|
|
|
set VSCODEUSERDATADIR=%TEMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2%
|
2020-05-07 06:26:12 +00:00
|
|
|
set VSCODECRASHDIR=%~dp0\..\.build\crashes
|
2021-06-15 06:33:26 +00:00
|
|
|
set VSCODELOGSDIR=%~dp0\..\.build\logs\integration-tests
|
2016-04-29 07:44:54 +00:00
|
|
|
|
2019-09-04 06:55:20 +00:00
|
|
|
:: Figure out which Electron to use for running tests
|
2019-09-02 09:26:26 +00:00
|
|
|
if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
|
2019-11-08 16:21:19 +00:00
|
|
|
chcp 65001
|
2019-09-02 09:26:26 +00:00
|
|
|
set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat
|
2019-11-08 16:21:19 +00:00
|
|
|
set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1
|
2019-09-04 06:55:20 +00:00
|
|
|
|
2020-02-04 19:26:12 +00:00
|
|
|
echo Running integration tests out of sources.
|
2019-09-02 09:26:26 +00:00
|
|
|
) else (
|
2020-01-15 15:36:03 +00:00
|
|
|
set VSCODE_CLI=1
|
|
|
|
set ELECTRON_ENABLE_LOGGING=1
|
|
|
|
|
2020-02-04 19:26:12 +00:00
|
|
|
echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build.
|
2019-09-02 09:26:26 +00:00
|
|
|
)
|
|
|
|
|
2022-09-26 07:16:42 +00:00
|
|
|
echo Storing crash reports into '%VSCODECRASHDIR%'.
|
|
|
|
echo Storing log files into '%VSCODELOGSDIR%'.
|
|
|
|
|
2021-07-01 13:23:32 +00:00
|
|
|
|
|
|
|
:: Tests standalone (AMD)
|
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### node.js integration tests
|
2021-02-20 01:22:38 +00:00
|
|
|
call .\scripts\test.bat --runGlob **\*.integrationTest.js %*
|
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2018-10-29 22:23:39 +00:00
|
|
|
|
2021-07-01 13:23:32 +00:00
|
|
|
|
2017-11-15 10:15:41 +00:00
|
|
|
:: Tests in the extension host
|
2019-10-08 16:02:55 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --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 14:09:40 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### API tests (folder)
|
|
|
|
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 %API_TESTS_EXTRA_ARGS%
|
2019-02-12 19:12:44 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2018-01-26 15:16:36 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### API tests (workspace)
|
|
|
|
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 %API_TESTS_EXTRA_ARGS%
|
2019-02-12 19:12:44 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2017-12-13 00:58:43 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### Colorize tests
|
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-colorize-tests\test --extensionDevelopmentPath=%~dp0\..\extensions\vscode-colorize-tests --extensionTestsPath=%~dp0\..\extensions\vscode-colorize-tests\out %API_TESTS_EXTRA_ARGS%
|
2021-01-19 10:03:56 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### TypeScript tests
|
2022-05-02 12:05:30 +00: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 %API_TESTS_EXTRA_ARGS%
|
2021-01-15 19:19:33 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2020-07-08 00:38:03 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### Markdown tests
|
|
|
|
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 %API_TESTS_EXTRA_ARGS%
|
2020-02-10 14:32:59 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### Emmet tests
|
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\emmet\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test %API_TESTS_EXTRA_ARGS%
|
2017-12-13 00:58:43 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2016-04-28 14:15:19 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### Git tests
|
2020-02-05 08:35:22 +00: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 08:13:21 +00:00
|
|
|
mkdir %GITWORKSPACE%
|
2022-05-02 12:05:30 +00:00
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %GITWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test %API_TESTS_EXTRA_ARGS%
|
2020-02-05 08:13:21 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2020-02-04 11:46:15 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### Ipynb tests
|
2021-08-03 19:15:06 +00:00
|
|
|
set IPYNBWORKSPACE=%TEMPDIR%\ipynb-%RANDOM%
|
|
|
|
mkdir %IPYNBWORKSPACE%
|
2022-01-31 06:28:38 +00:00
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %IPYNBWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\ipynb --extensionTestsPath=%~dp0\..\extensions\ipynb\out\test %API_TESTS_EXTRA_ARGS%
|
2021-08-03 19:15:06 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
|
|
|
|
2022-06-14 07:08:27 +00:00
|
|
|
echo.
|
|
|
|
echo ### Configuration editing tests
|
|
|
|
set CFWORKSPACE=%TEMPDIR%\cf-%RANDOM%
|
|
|
|
mkdir %CFWORKSPACE%
|
|
|
|
call "%INTEGRATION_TEST_ELECTRON_PATH%" %CFWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\configuration-editing --extensionTestsPath=%~dp0\..\extensions\configuration-editing\out\test %API_TESTS_EXTRA_ARGS%
|
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2021-07-01 13:23:32 +00:00
|
|
|
|
|
|
|
:: Tests standalone (CommonJS)
|
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### CSS tests
|
2020-12-18 16:38:23 +00: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 10:04:38 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
echo.
|
|
|
|
echo ### HTML tests
|
2020-08-18 10:04:38 +00:00
|
|
|
call %~dp0\node-electron.bat %~dp0\..\extensions\html-language-features/server/test/index.js
|
2019-06-24 10:11:26 +00:00
|
|
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
2017-11-15 10:15:41 +00:00
|
|
|
|
2022-01-31 06:28:38 +00:00
|
|
|
|
|
|
|
:: Cleanup
|
|
|
|
|
2017-03-17 17:19:31 +00:00
|
|
|
rmdir /s /q %VSCODEUSERDATADIR%
|
2017-03-17 15:52:31 +00:00
|
|
|
|
2017-04-26 08:17:59 +00:00
|
|
|
popd
|
|
|
|
|
2017-03-07 16:28:16 +00:00
|
|
|
endlocal
|