From ddbda4c196baa9dfc43c5da2401f063d4bd76724 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 19 Nov 2021 11:12:49 +0100 Subject: tests - enable crash reporter for electron based unit tests //cc @deepak1556 --- scripts/test.bat | 2 +- scripts/test.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/test.bat b/scripts/test.bat index 7232c26193c..d45505db8a7 100644 --- a/scripts/test.bat +++ b/scripts/test.bat @@ -17,7 +17,7 @@ if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron :: Run tests set ELECTRON_ENABLE_LOGGING=1 -%CODE% .\test\unit\electron\index.js %* +%CODE% .\test\unit\electron\index.js --crash-reporter-directory=%~dp0\..\.build\crashes %* popd diff --git a/scripts/test.sh b/scripts/test.sh index 10ffb97c71f..14a72e09cc3 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -21,6 +21,8 @@ else CODE=".build/electron/$NAME" fi +VSCODECRASHDIR=$ROOT/.build/crashes + # Node modules test -d node_modules || yarn @@ -32,10 +34,10 @@ if [[ "$OSTYPE" == "darwin"* ]]; then cd $ROOT ; ulimit -n 4096 ; \ ELECTRON_ENABLE_LOGGING=1 \ "$CODE" \ - test/unit/electron/index.js "$@" + test/unit/electron/index.js --crash-reporter-directory=$VSCODECRASHDIR "$@" else cd $ROOT ; \ ELECTRON_ENABLE_LOGGING=1 \ "$CODE" \ - test/unit/electron/index.js $LINUX_EXTRA_ARGS "$@" + test/unit/electron/index.js --crash-reporter-directory=$VSCODECRASHDIR $LINUX_EXTRA_ARGS "$@" fi -- cgit v1.2.3