From a04debf2751c37f6c06807a0edd20672cd442186 Mon Sep 17 00:00:00 2001 From: Aaron Dodson Date: Tue, 10 Aug 2021 15:11:56 -0700 Subject: [PATCH] Fix issue that prevented Mocha and generator tests from running on certain configurations (#5344) * Fix issue that prevented Mocha and generator tests from running on certain configurations * Link to Blockly issue re: --disable-gpu flag --- tests/generators/run_generators_in_browser.js | 5 ++++- tests/mocha/run_mocha_tests_in_browser.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/generators/run_generators_in_browser.js b/tests/generators/run_generators_in_browser.js index 2ab48ee2e..97dcf9727 100644 --- a/tests/generators/run_generators_in_browser.js +++ b/tests/generators/run_generators_in_browser.js @@ -51,8 +51,11 @@ async function runGeneratorsInBrowser() { args: ['--headless', '--no-sandbox', '--disable-dev-shm-usage', '--allow-file-access-from-files'] }; } else { + // --disable-gpu is needed to prevent Chrome from hanging on Linux with + // NVIDIA drivers older than v295.20. See + // https://github.com/google/blockly/issues/5345 for details. options.capabilities['goog:chromeOptions'] = { - args: ['--allow-file-access-from-files'] + args: ['--allow-file-access-from-files', '--disable-gpu'] }; } diff --git a/tests/mocha/run_mocha_tests_in_browser.js b/tests/mocha/run_mocha_tests_in_browser.js index 253b79f01..3034f38cc 100644 --- a/tests/mocha/run_mocha_tests_in_browser.js +++ b/tests/mocha/run_mocha_tests_in_browser.js @@ -36,8 +36,11 @@ async function runMochaTestsInBrowser() { ] }; } else { + // --disable-gpu is needed to prevent Chrome from hanging on Linux with + // NVIDIA drivers older than v295.20. See + // https://github.com/google/blockly/issues/5345 for details. options.capabilities['goog:chromeOptions'] = { - args: ['--allow-file-access-from-files'] + args: ['--allow-file-access-from-files', '--disable-gpu'] }; }