Sha256: 9bb99255f9eac7423781b64554f9407afaa1ee36405a908d34a8adc43e4980d4

Contents?: true

Size: 1.6 KB

Versions: 1

Compression:

Stored size: 1.6 KB

Contents

SimpleCov.add_group 'contrib', '/lib/ddtrace/contrib'
SimpleCov.add_group 'transport', '/lib/ddtrace/transport'
SimpleCov.add_group 'spec', '/spec/'

SimpleCov.coverage_dir ENV.fetch('COVERAGE_DIR', 'coverage')

# Each test run requires its own unique command_name.
# When running `rake spec:test_name`, the test process doesn't have access to the
# rake task process, so we have come up with unique values ourselves.
# 
# The current approach is to combine the ruby engine (ruby-2.7,jruby-9.2),
# program name (rspec/test), command line arguments (--pattern spec/**/*_spec.rb),
# and the loaded gemset.
#
# This should allow us to distinguish between runs with the same tests, but different gemsets:
#   * appraisal rails5-mysql2 rake spec:rails
#   * appraisal rails5-postgres rake spec:rails
#
# Subsequent runs of the same exact test suite should have the same command_name.
command_line_arguments = ARGV.join(' ')
gemset_hash = Digest::MD5.hexdigest Gem.loaded_specs.values.map { |x| "#{x.name}#{x.version}" }.sort.join
ruby_engine = if defined?(RUBY_ENGINE_VERSION)
  "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}"
else
  "#{RUBY_ENGINE}-#{RUBY_VERSION}" # For Ruby < 2.3
end
SimpleCov.command_name "#{ruby_engine}:#{gemset_hash}:#{$PROGRAM_NAME} #{command_line_arguments}"

# A very large number to disable result merging timeout
SimpleCov.merge_timeout 2 ** 31

# DEV If we choose to enforce a hard minimum.
# SimpleCov.minimum_coverage 95

# DEV If we choose to enforce a maximum coverage drop.
# DEV We have to figure out where to store previous coverage data
# DEV in order to perform this comparison
# SimpleCov.maximum_coverage_drop 1

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ddtrace-0.43.0 .simplecov