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