test-integration.bat 3.3 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 25
	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

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

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

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

38
:: Tests in the extension host
39 40

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 已提交
41
if %errorlevel% neq 0 exit /b %errorlevel%
42

43
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 已提交
44
if %errorlevel% neq 0 exit /b %errorlevel%
45

J
Johannes Rieken 已提交
46
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%
47 48
if %errorlevel% neq 0 exit /b %errorlevel%

J
Johannes Rieken 已提交
49
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% .
50
if %errorlevel% neq 0 exit /b %errorlevel%
A
Alexandru Dima 已提交
51

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

56 57 58
if exist ".\resources\server\test\test-remote-integration.bat" (
	call .\resources\server\test\test-remote-integration.bat
)
59

60
rmdir /s /q %VSCODEUSERDATADIR%
61

J
build  
Joao Moreno 已提交
62 63
popd

64
endlocal