vscode/scripts/test.bat

32 lines
788 B
Batchfile
Raw Normal View History

@echo off
setlocal
2016-01-04 12:35:25 +01:00
set ELECTRON_RUN_AS_NODE=
2016-01-04 12:35:25 +01:00
pushd %~dp0\..
2017-05-10 11:11:21 +02:00
:: Get Code.exe location
for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=%NAMESHORT:"=%.exe
set CODE=".build\electron\%NAMESHORT%"
2017-05-10 11:11:21 +02:00
:: Download Electron if needed
call node build\lib\electron.js
2017-11-16 14:43:41 +01:00
if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron
2017-05-10 11:11:21 +02:00
:: Run tests
set ELECTRON_ENABLE_LOGGING=1
%CODE% .\test\unit\electron\index.js --crash-reporter-directory=%~dp0\..\.build\crashes %*
2016-01-04 12:35:25 +01:00
popd
endlocal
2017-07-25 23:40:35 +02:00
2017-07-26 04:40:26 +02:00
:: app.exit(0) is exiting with code 255 in Electron 1.7.4.
2020-09-16 01:13:49 +02:00
:: See https://github.com/microsoft/vscode/issues/28582
2017-07-26 04:40:26 +02:00
echo errorlevel: %errorlevel%
2017-07-25 23:40:35 +02:00
if %errorlevel% == 255 set errorlevel=0
exit /b %errorlevel%