test-integration.bat 3.1 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
	set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat
B
Benjamin Pasero 已提交
12 13

	echo "Running integration tests out of sources."
14
) else (
B
Benjamin Pasero 已提交
15
	:: Run from a built: need to compile all test extensions
16 17 18 19 20 21 22 23
	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

B
Benjamin Pasero 已提交
24
	echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build."
25 26
)

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

31
:: Tests in the extension host
32 33

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

36 37
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 已提交
38
if %errorlevel% neq 0 exit /b %errorlevel%
39

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

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

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

50 51 52
if exist ".\resources\server\test\test-remote-integration.bat" (
	call .\resources\server\test\test-remote-integration.bat
)
53

54
rmdir /s /q %VSCODEUSERDATADIR%
55

J
build  
Joao Moreno 已提交
56 57
popd

58
endlocal