1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot_rails.git synced 2022-11-09 11:49:18 -05:00
thoughtbot--factory_bot_rails/features/support/env.rb

29 lines
734 B
Ruby
Raw Normal View History

require "aruba/cucumber"
2018-09-28 22:34:23 -04:00
PROJECT_ROOT =
File.expand_path(File.join(File.dirname(__FILE__), "..", "..")).freeze
2011-06-29 12:30:28 -04:00
Aruba.configure do |config|
config.exit_timeout = Integer ENV.fetch("ARUBA_TIMEOUT") { 120 }
2011-06-29 12:30:28 -04:00
end
2012-12-19 14:29:51 -05:00
if RUBY_PLATFORM == "java"
Aruba.configure do |config|
2018-09-28 22:34:23 -04:00
config.before_cmd do
# disable JIT since these processes are so short lived
set_env("JRUBY_OPTS", "-X-C #{ENV['JRUBY_OPTS']}")
java_options = ENV["JAVA_OPTS"]
if 1.size == 4 # 4 for 32 bit java, 8 for 64 bit java.
set_env("JAVA_OPTS", "-d32 #{java_options}")
else
2018-09-28 22:34:23 -04:00
set_env(
"JAVA_OPTS",
"-XX:+TieredCompilation -XX:TieredStopAtLevel=1 #{java_options}",
)
end
end
2012-12-19 14:29:51 -05:00
end
end