From b344f434980621de2ddf35d5788c16a8399bc765 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 15 Feb 2022 16:27:08 +0100 Subject: [PATCH] Revert "linux: disable crash reporting in CI (#142572)" This reverts commit 7dbd7367dc96690ae1cae12f9d74191b3f21b6fe. --- scripts/test-integration.sh | 3 +-- scripts/test-remote-integration.sh | 3 +-- scripts/test.sh | 3 +-- src/main.js | 12 +++++++----- test/unit/electron/index.js | 3 +-- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/scripts/test-integration.sh b/scripts/test-integration.sh index 418b6bb8a6c..2fb82e34740 100755 --- a/scripts/test-integration.sh +++ b/scripts/test-integration.sh @@ -8,8 +8,7 @@ else ROOT=$(dirname $(dirname $(readlink -f $0))) # --disable-dev-shm-usage --use-gl=swiftshader: when run on docker containers where size of /dev/shm # partition < 64MB which causes OOM failure for chromium compositor that uses the partition for shared memory - # --disable-crash-reporter: TODO@electron this needs Electron 17 to work (https://github.com/microsoft/vscode/issues/142572) - LINUX_EXTRA_ARGS="--disable-dev-shm-usage --use-gl=swiftshader --disable-crash-reporter" + LINUX_EXTRA_ARGS="--disable-dev-shm-usage --use-gl=swiftshader" fi VSCODEUSERDATADIR=`mktemp -d 2>/dev/null` diff --git a/scripts/test-remote-integration.sh b/scripts/test-remote-integration.sh index d1029aaa277..39c36592e24 100755 --- a/scripts/test-remote-integration.sh +++ b/scripts/test-remote-integration.sh @@ -8,8 +8,7 @@ else ROOT=$(dirname $(dirname $(readlink -f $0))) # --disable-dev-shm-usage --use-gl=swiftshader: when run on docker containers where size of /dev/shm # partition < 64MB which causes OOM failure for chromium compositor that uses the partition for shared memory - # --disable-crash-reporter: TODO@electron this needs Electron 17 to work (https://github.com/microsoft/vscode/issues/142572) - LINUX_EXTRA_ARGS="--disable-dev-shm-usage --use-gl=swiftshader --disable-crash-reporter" + LINUX_EXTRA_ARGS="--disable-dev-shm-usage --use-gl=swiftshader" fi VSCODEUSERDATADIR=`mktemp -d 2>/dev/null` diff --git a/scripts/test.sh b/scripts/test.sh index 4c3021d474d..14a72e09cc3 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -8,8 +8,7 @@ else ROOT=$(dirname $(dirname $(readlink -f $0))) # --disable-dev-shm-usage --use-gl=swiftshader: when run on docker containers where size of /dev/shm # partition < 64MB which causes OOM failure for chromium compositor that uses the partition for shared memory - # --disableCrashReporter: TODO@electron this needs Electron 17 to work (https://github.com/microsoft/vscode/issues/142572) - LINUX_EXTRA_ARGS="--disable-dev-shm-usage --use-gl=swiftshader --disableCrashReporter" + LINUX_EXTRA_ARGS="--disable-dev-shm-usage --use-gl=swiftshader" fi cd $ROOT diff --git a/src/main.js b/src/main.js index ca3f417fd8d..c9347d4516b 100644 --- a/src/main.js +++ b/src/main.js @@ -45,14 +45,16 @@ const argvConfig = configureCommandlineSwitchesSync(args); // Configure crash reporter perf.mark('code/willStartCrashReporter'); -// Disables crash reporting if `disable-crash-reporter` is set. -// -// If a `crash-reporter-directory` is specified we store the crash reports +// If a crash-reporter-directory is specified we store the crash reports // in the specified directory and don't upload them to the crash server. // // Appcenter crash reporting is enabled if -// * `enable-crash-reporter` runtime argument is set to `true` -if (!args['disable-crash-reporter'] && (args['crash-reporter-directory'] || argvConfig['enable-crash-reporter'])) { +// * enable-crash-reporter runtime argument is set to 'true' +// * --disable-crash-reporter command line parameter is not set +// +// Disable crash reporting in all other cases. +if (args['crash-reporter-directory'] || + (argvConfig['enable-crash-reporter'] && !args['disable-crash-reporter'])) { configureCrashReporter(); } perf.mark('code/didStartCrashReporter'); diff --git a/test/unit/electron/index.js b/test/unit/electron/index.js index e8c7164c5a5..2c3ad1ab9fc 100644 --- a/test/unit/electron/index.js +++ b/test/unit/electron/index.js @@ -32,7 +32,6 @@ const optimist = require('optimist') .describe('wait-server', 'port to connect to and wait before running tests') .describe('timeout', 'timeout for tests') .describe('crash-reporter-directory', 'crash reporter directory').string('crash-reporter-directory') - .describe('disableCrashReporter', 'disable crash reporter').boolean('disableCrashReporter') .describe('tfs').string('tfs') .describe('help', 'show the help').alias('help', 'h'); @@ -44,7 +43,7 @@ if (argv.help) { } let crashReporterDirectory = argv['crash-reporter-directory']; -if (crashReporterDirectory && !argv.disableCrashReporter) { +if (crashReporterDirectory) { crashReporterDirectory = path.normalize(crashReporterDirectory); if (!path.isAbsolute(crashReporterDirectory)) {