Commit f7ffe27c authored by Stan Hu's avatar Stan Hu

Disable /dev/shm in CI

According to the Chrome source code (https://chromium.googlesource.com/chromium/src/base/+/master/base_switches.cc#120):

The /dev/shm partition is too small in certain VM environments, causing Chrome
to fail or crash (see http://crbug.com/715363). Use this flag to work-around
this issue (a temporary directory will always be used to create anonymous
shared memory files).

Addresses gitlab-org/gitlab-ee#4252 but doesn't appear to cure it completely.
parent 36f47103
...@@ -29,6 +29,9 @@ Capybara.register_driver :chrome do |app| ...@@ -29,6 +29,9 @@ Capybara.register_driver :chrome do |app|
options.add_argument("disable-gpu") options.add_argument("disable-gpu")
end end
# Disable /dev/shm use in CI. See https://gitlab.com/gitlab-org/gitlab-ee/issues/4252
options.add_argument("disable-dev-shm-usage") if ENV['CI'] || ENV['CI_SERVER']
Capybara::Selenium::Driver.new( Capybara::Selenium::Driver.new(
app, app,
browser: :chrome, browser: :chrome,
......
...@@ -33,6 +33,9 @@ Capybara.register_driver :chrome do |app| ...@@ -33,6 +33,9 @@ Capybara.register_driver :chrome do |app|
options.add_argument("disable-gpu") options.add_argument("disable-gpu")
end end
# Disable /dev/shm use in CI. See https://gitlab.com/gitlab-org/gitlab-ee/issues/4252
options.add_argument("disable-dev-shm-usage") if ENV['CI'] || ENV['CI_SERVER']
Capybara::Selenium::Driver.new( Capybara::Selenium::Driver.new(
app, app,
browser: :chrome, browser: :chrome,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment