633b4b9e51
MSP-11671 `bundler install --without coverage` will not install `simplecov`. Running without simplecov changes the average runtime of `rake cucumber:boot` from (n=13) 112.50 seconds to (n=10) 32.17 seconds (-71.41%). (-73.68% from 2c1203ba49d49603aec169eed053ab929ccdedc6.) Raw data: https://docs.google.com/spreadsheets/d/1vCRi_38Go3Wfq670eDCXMTSSXL1blSbk6NQsgpOqfYw/edit?usp=sharing.
17 lines
472 B
Ruby
17 lines
472 B
Ruby
# @note this file is loaded in env.rb to setup simplecov using RUBYOPTs for child processes
|
|
|
|
simplecov_command_name = ENV['SIMPLECOV_COMMAND_NAME']
|
|
|
|
# will not be set if hook does not run because `bundle install --without coverage`
|
|
if simplecov_command_name
|
|
require 'simplecov'
|
|
|
|
require 'pathname'
|
|
|
|
root = Pathname(__FILE__).expand_path.parent.parent.parent
|
|
|
|
SimpleCov.command_name(simplecov_command_name)
|
|
SimpleCov.root(root)
|
|
load root.join('.simplecov')
|
|
end
|