|
1 |
| -@echo off |
2 |
| -setlocal |
3 |
| - |
4 |
| -pushd %~dp0\.. |
5 |
| - |
6 |
| -set VSCODEUSERDATADIR=%TEMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2% |
7 |
| -set VSCODECRASHDIR=%~dp0\..\.build\crashes |
8 |
| -set VSCODELOGSDIR=%~dp0\..\.build\logs\integration-tests |
9 |
| - |
10 |
| -:: Figure out which Electron to use for running tests |
11 |
| -if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( |
12 |
| - chcp 65001 |
13 |
| - set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat |
14 |
| - set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1 |
15 |
| - |
16 |
| - echo Running integration tests out of sources. |
17 |
| -) else ( |
18 |
| - set VSCODE_CLI=1 |
19 |
| - set ELECTRON_ENABLE_LOGGING=1 |
20 |
| - |
21 |
| - echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build. |
22 |
| -) |
23 |
| - |
24 |
| -echo Storing crash reports into '%VSCODECRASHDIR%'. |
25 |
| -echo Storing log files into '%VSCODELOGSDIR%'. |
26 |
| - |
27 |
| - |
28 |
| -:: Unit tests |
29 |
| - |
30 |
| -echo. |
31 |
| -echo ### node.js integration tests |
32 |
| -call .\scripts\test.bat --runGlob **\*.integrationTest.js %* |
33 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
34 |
| - |
35 |
| - |
36 |
| -:: Tests in the extension host |
37 |
| - |
38 |
| -set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR% |
39 |
| - |
40 |
| -echo. |
41 |
| -echo ### API tests (folder) |
42 |
| -call npm run test-extension -- -l vscode-api-tests-folder --enable-proposed-api=vscode.vscode-api-tests %API_TESTS_EXTRA_ARGS% |
43 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
44 |
| - |
45 |
| -echo. |
46 |
| -echo ### API tests (workspace) |
47 |
| -call npm run test-extension -- -l vscode-api-tests-workspace --enable-proposed-api=vscode.vscode-api-tests %API_TESTS_EXTRA_ARGS% |
48 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
49 |
| - |
50 |
| -echo. |
51 |
| -echo ### Colorize tests |
52 |
| -call npm run test-extension -- -l vscode-colorize-tests |
53 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
54 |
| - |
55 |
| -echo. |
56 |
| -echo ### Terminal Suggest tests |
57 |
| -call npm run test-extension -- -l terminal-suggest --enable-proposed-api=vscode.vscode-api-tests |
58 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
59 |
| - |
60 |
| -echo. |
61 |
| -echo ### TypeScript tests |
62 |
| -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% |
63 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
64 |
| - |
65 |
| -echo. |
66 |
| -echo ### Markdown tests |
67 |
| -call npm run test-extension -- -l markdown-language-features |
68 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
69 |
| - |
70 |
| -echo. |
71 |
| -echo ### Emmet tests |
72 |
| -call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\emmet\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test %API_TESTS_EXTRA_ARGS% |
73 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
74 |
| - |
75 |
| -echo. |
76 |
| -echo ### Git tests |
77 |
| -for /f "delims=" %%i in ('node -p "require('fs').realpathSync.native(require('os').tmpdir())"') do set TEMPDIR=%%i |
78 |
| -set GITWORKSPACE=%TEMPDIR%\git-%RANDOM% |
79 |
| -mkdir %GITWORKSPACE% |
80 |
| -call "%INTEGRATION_TEST_ELECTRON_PATH%" %GITWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test %API_TESTS_EXTRA_ARGS% |
81 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
82 |
| - |
83 |
| -echo. |
84 |
| -echo ### Ipynb tests |
85 |
| -call npm run test-extension -- -l ipynb |
86 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
87 |
| - |
88 |
| -echo. |
89 |
| -echo ### Notebook Output tests |
90 |
| -call npm run test-extension -- -l notebook-renderers |
91 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
92 |
| - |
93 |
| -echo. |
94 |
| -echo ### Configuration editing tests |
95 |
| -set CFWORKSPACE=%TEMPDIR%\cf-%RANDOM% |
96 |
| -mkdir %CFWORKSPACE% |
97 |
| -call npm run test-extension -- -l configuration-editing |
98 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
99 |
| - |
100 |
| -echo. |
101 |
| -echo ### GitHub Authentication tests |
102 |
| -call npm run test-extension -- -l github-authentication |
103 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
104 |
| - |
105 |
| -:: Tests standalone (CommonJS) |
106 |
| - |
107 |
| -echo. |
108 |
| -echo ### CSS tests |
109 |
| -call %~dp0\node-electron.bat %~dp0\..\extensions\css-language-features/server/test/index.js |
110 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
111 |
| - |
112 |
| -echo. |
113 |
| -echo ### HTML tests |
114 |
| -call %~dp0\node-electron.bat %~dp0\..\extensions\html-language-features/server/test/index.js |
115 |
| -if %errorlevel% neq 0 exit /b %errorlevel% |
116 |
| - |
117 |
| - |
118 |
| -:: Cleanup |
119 |
| - |
120 |
| -rmdir /s /q %VSCODEUSERDATADIR% |
121 |
| - |
122 |
| -popd |
123 |
| - |
124 |
| -endlocal |
| 1 | +@echo off |
| 2 | +setlocal |
| 3 | + |
| 4 | +pushd %~dp0\.. |
| 5 | + |
| 6 | +set VSCODEUSERDATADIR=%TEMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2% |
| 7 | +set VSCODECRASHDIR=%~dp0\..\.build\crashes |
| 8 | +set VSCODELOGSDIR=%~dp0\..\.build\logs\integration-tests |
| 9 | + |
| 10 | +:: Figure out which Electron to use for running tests |
| 11 | +if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" ( |
| 12 | + chcp 65001 |
| 13 | + set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat |
| 14 | + set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1 |
| 15 | + |
| 16 | + echo Running integration tests out of sources. |
| 17 | +) else ( |
| 18 | + set VSCODE_CLI=1 |
| 19 | + set ELECTRON_ENABLE_LOGGING=1 |
| 20 | + |
| 21 | + echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build. |
| 22 | +) |
| 23 | + |
| 24 | +echo Storing crash reports into '%VSCODECRASHDIR%'. |
| 25 | +echo Storing log files into '%VSCODELOGSDIR%'. |
| 26 | + |
| 27 | + |
| 28 | +:: Unit tests |
| 29 | + |
| 30 | +echo. |
| 31 | +echo ### node.js integration tests |
| 32 | +call .\scripts\test.bat --runGlob **\*.integrationTest.js %* |
| 33 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 34 | + |
| 35 | + |
| 36 | +:: Tests in the extension host |
| 37 | + |
| 38 | +set API_TESTS_EXTRA_ARGS=--disable-telemetry --skip-welcome --skip-release-notes --crash-reporter-directory=%VSCODECRASHDIR% --logsPath=%VSCODELOGSDIR% --no-cached-data --disable-updates --use-inmemory-secretstorage --disable-extensions --disable-workspace-trust --user-data-dir=%VSCODEUSERDATADIR% |
| 39 | + |
| 40 | +echo. |
| 41 | +echo ### API tests (folder) |
| 42 | +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% |
| 43 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 44 | + |
| 45 | +echo. |
| 46 | +echo ### API tests (workspace) |
| 47 | +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% |
| 48 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 49 | + |
| 50 | +echo. |
| 51 | +echo ### Colorize tests |
| 52 | +call npm run test-extension -- -l vscode-colorize-tests |
| 53 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 54 | + |
| 55 | +echo. |
| 56 | +echo ### Terminal Suggest tests |
| 57 | +call npm run test-extension -- -l terminal-suggest --enable-proposed-api=vscode.vscode-api-tests |
| 58 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 59 | + |
| 60 | +echo. |
| 61 | +echo ### TypeScript tests |
| 62 | +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% |
| 63 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 64 | + |
| 65 | +echo. |
| 66 | +echo ### Markdown tests |
| 67 | +call npm run test-extension -- -l markdown-language-features |
| 68 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 69 | + |
| 70 | +echo. |
| 71 | +echo ### Emmet tests |
| 72 | +call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\emmet\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test %API_TESTS_EXTRA_ARGS% |
| 73 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 74 | + |
| 75 | +echo. |
| 76 | +echo ### Git tests |
| 77 | +for /f "delims=" %%i in ('node -p "require('fs').realpathSync.native(require('os').tmpdir())"') do set TEMPDIR=%%i |
| 78 | +set GITWORKSPACE=%TEMPDIR%\git-%RANDOM% |
| 79 | +mkdir %GITWORKSPACE% |
| 80 | +call "%INTEGRATION_TEST_ELECTRON_PATH%" %GITWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test %API_TESTS_EXTRA_ARGS% |
| 81 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 82 | + |
| 83 | +echo. |
| 84 | +echo ### Ipynb tests |
| 85 | +call npm run test-extension -- -l ipynb |
| 86 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 87 | + |
| 88 | +echo. |
| 89 | +echo ### Notebook Output tests |
| 90 | +call npm run test-extension -- -l notebook-renderers |
| 91 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 92 | + |
| 93 | +echo. |
| 94 | +echo ### Configuration editing tests |
| 95 | +set CFWORKSPACE=%TEMPDIR%\cf-%RANDOM% |
| 96 | +mkdir %CFWORKSPACE% |
| 97 | +call npm run test-extension -- -l configuration-editing |
| 98 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 99 | + |
| 100 | +echo. |
| 101 | +echo ### GitHub Authentication tests |
| 102 | +call npm run test-extension -- -l github-authentication |
| 103 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 104 | + |
| 105 | +:: Tests standalone (CommonJS) |
| 106 | + |
| 107 | +echo. |
| 108 | +echo ### CSS tests |
| 109 | +call %~dp0\node-electron.bat %~dp0\..\extensions\css-language-features/server/test/index.js |
| 110 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 111 | + |
| 112 | +echo. |
| 113 | +echo ### HTML tests |
| 114 | +call %~dp0\node-electron.bat %~dp0\..\extensions\html-language-features/server/test/index.js |
| 115 | +if %errorlevel% neq 0 exit /b %errorlevel% |
| 116 | + |
| 117 | + |
| 118 | +:: Cleanup |
| 119 | + |
| 120 | +rmdir /s /q %VSCODEUSERDATADIR% |
| 121 | + |
| 122 | +popd |
| 123 | + |
| 124 | +endlocal |
0 commit comments