test-integration.bat 3.6 KB
Newer Older
A
Alexandru Dima 已提交
1 2 3
@echo off
setlocal

J
build  
Joao Moreno 已提交
4 5
pushd %~dp0\..

6
set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5%
7

B
Benjamin Pasero 已提交
8
:: Figure out which Electron to use for running tests
9
if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
B
Benjamin Pasero 已提交
10
	:: Run out of sources: no need to compile as code.sh takes care of it
11
	chcp 65001
12
	set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat
13
	set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1
B
Benjamin Pasero 已提交
14 15

	echo "Running integration tests out of sources."
16
) else (
B
Benjamin Pasero 已提交
17
	:: Run from a built: need to compile all test extensions
18 19 20 21 22 23 24
	call yarn gulp compile-extension:vscode-api-tests
	call yarn gulp compile-extension:vscode-colorize-tests
	call yarn gulp compile-extension:markdown-language-features
	call yarn gulp compile-extension:emmet
	call yarn gulp compile-extension:css-language-features-server
	call yarn gulp compile-extension:html-language-features-server
	call yarn gulp compile-extension:json-language-features-server
J
Joao Moreno 已提交
25
	call yarn gulp compile-extension:git
26

27 28 29 30 31
	:: Configuration for more verbose output
	set VSCODE_CLI=1
	set ELECTRON_ENABLE_LOGGING=1
	set ELECTRON_ENABLE_STACK_DUMPING=1

B
Benjamin Pasero 已提交
32
	echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build."
33 34
)

R
Rob Lourens 已提交
35 36 37 38
:: Integration & performance tests in AMD
call .\scripts\test.bat --runGlob **\*.integrationTest.js %*
if %errorlevel% neq 0 exit /b %errorlevel%

39
:: Tests in the extension host
40 41

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 --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
D
Daniel Imms 已提交
42
if %errorlevel% neq 0 exit /b %errorlevel%
43

44
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 --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
D
Daniel Imms 已提交
45
if %errorlevel% neq 0 exit /b %errorlevel%
46

J
Johannes Rieken 已提交
47
call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-colorize-tests\test --extensionDevelopmentPath=%~dp0\..\extensions\vscode-colorize-tests --extensionTestsPath=%~dp0\..\extensions\vscode-colorize-tests\out --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
48 49
if %errorlevel% neq 0 exit /b %errorlevel%

J
Johannes Rieken 已提交
50
call "%INTEGRATION_TEST_ELECTRON_PATH%" $%~dp0\..\extensions\emmet\test-fixtures --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% .
51
if %errorlevel% neq 0 exit /b %errorlevel%
A
Alexandru Dima 已提交
52

53 54 55
call "%INTEGRATION_TEST_ELECTRON_PATH%" %TMP%\git-%RANDOM%-%TIME:~6,5% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% .
if %errorlevel% neq 0 exit /b %errorlevel%

56
:: Tests in commonJS (HTML, CSS, JSON language server tests...)
57 58
call .\scripts\node-electron.bat .\node_modules\mocha\bin\_mocha .\extensions\*\server\out\test\**\*.test.js
if %errorlevel% neq 0 exit /b %errorlevel%
59

60 61 62
if exist ".\resources\server\test\test-remote-integration.bat" (
	call .\resources\server\test\test-remote-integration.bat
)
63

64
rmdir /s /q %VSCODEUSERDATADIR%
65

J
build  
Joao Moreno 已提交
66 67
popd

68
endlocal