2016-03-03 16:20:48 +00:00
|
|
|
@echo off
|
2016-02-18 15:50:33 +00:00
|
|
|
setlocal
|
2016-01-04 11:35:25 +00:00
|
|
|
|
2017-04-04 15:03:39 +00:00
|
|
|
set ELECTRON_RUN_AS_NODE=
|
2016-09-02 05:43:02 +00:00
|
|
|
|
2016-01-04 11:35:25 +00:00
|
|
|
pushd %~dp0\..
|
2016-08-09 15:13:08 +00:00
|
|
|
|
2017-05-10 09:11:21 +00:00
|
|
|
:: Get Code.exe location
|
2016-08-09 15:13:08 +00:00
|
|
|
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
|
2017-11-16 13:43:41 +00:00
|
|
|
node build\lib\electron.js
|
|
|
|
if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron
|
2017-05-10 09:11:21 +00:00
|
|
|
|
|
|
|
:: Run tests
|
2019-09-02 07:30:31 +00:00
|
|
|
set ELECTRON_ENABLE_LOGGING=1
|
2020-02-07 08:51:24 +00:00
|
|
|
%CODE% .\test\unit\electron\index.js %*
|
2016-09-14 05:29:20 +00:00
|
|
|
|
2016-01-04 11:35:25 +00:00
|
|
|
popd
|
2016-02-18 15:50:33 +00:00
|
|
|
|
2016-03-03 10:17:48 +00:00
|
|
|
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
|
|
|
|
|
2017-04-04 15:03:39 +00:00
|
|
|
exit /b %errorlevel%
|