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