Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

SimpleCov execution in rspec-core builds is sneakily broken #3083

Closed
@nevinera

Description

@nevinera

The current build appears to be attempting to run simplecov (it goes to some trouble), and enforce a 100% coverage rule against it, but if you look through the build output of a recent build on the main branch, you'll find a line like this:

Coverage report generated for RSpec to /home/runner/work/rspec-core/rspec-core/coverage. 2 / 2 LOC (100.0%) covered.

100% is good! But that appears to only be 100% of the two lines in the exe/rspec file, rather than the entire rspec-core gem, and I'm not sure why. When I run it locally using a more conventional RSpec::Support::Spec.setup_simplecov as we use in rspec-expectations, I see that we're closer to 98%, with the most significant missing coverage on lib/rspec/core/bisect/fork_runner.rb (all of RunDispatcher#run_specs).

Screenshot 2024-05-09 at 6 32 39 PM

Is anyone confident that we actually still need this wrapper script? It was introduced in 2013, and simplecov (and Coverage itself) have come a long way since then. Certainly my experience running simplecov locally against rspec-core doesn't match the experience this script was introduced to solve as described in the introducing commit:

Simplecov was only reporting coverage for a handful of rspec's files, and I realized why

I think the simplest answer here is to just get rid of it, and use the same setup approach the other gems use; we'd get to trim a fair bit of code that way. We'll need to adjust the coverage target downward until I can get more tests in again, but that shouldn't take long; there's less uncovered than rspec-expectations had already (or I can introduce the tests first if you'd rather, and get coverage to 100% before fixing the simplecov setup)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions