2

I have a ruby project that contains many subprojects. Each subproject runs simplecov and the root project folder runs a rakefile to generate the total coverage report for all the subprojects. The problem is that it shows the correct coverage for the last run and all the others before that are shown as a 100%. Does anyone know how to fix this?

subproject coverage (/root/plugin1/tests/plugin/test.rb):

SimpleCov.start do
  coverage_dir "#{ENV['WORKSPACE']}/coverage"

  command_name 'plugin1'
  root "#{ENV['WORKSPACE']}"

  at_exit do
    SimpleCov.result
  end
end

In the root rakefile (/root/):

SimpleCov.coverage_dir "#{ENV['WORKSPACE']}/coverage"

task :coverage do
  SimpleCov.result.format!
end

it creates a coverage folder in root (/root/coverage). I followed this from: https://github.com/colszowka/simplecov/issues/147

user3605351
  • 41
  • 1
  • 7

0 Answers0