vscode/scripts/test.bat

32 lines
788 B
Batchfile
Raw Normal View History

@echo off
setlocal
2016-01-04 11:35:25 +00:00
set ELECTRON_RUN_AS_NODE=
2016-01-04 11:35:25 +00:00
pushd %~dp0\..
2017-05-10 09:11:21 +00: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 09:11:21 +00:00
:: Download Electron if needed
call node build\lib\electron.js
2017-11-16 13:43:41 +00:00
if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron
2017-05-10 09:11:21 +00:00
:: Run tests
set ELECTRON_ENABLE_LOGGING=1
%CODE% .\test\unit\electron\index.js --crash-reporter-directory=%~dp0\..\.build\crashes %*
2016-01-04 11:35:25 +00:00
popd
endlocal
2017-07-25 21:40:35 +00:00
2017-07-26 02:40:26 +00:00
:: app.exit(0) is exiting with code 255 in Electron 1.7.4.
2020-09-15 23:13:49 +00:00
:: See https://github.com/microsoft/vscode/issues/28582
2017-07-26 02:40:26 +00:00
echo errorlevel: %errorlevel%
2017-07-25 21:40:35 +00:00
if %errorlevel% == 255 set errorlevel=0
exit /b %errorlevel%