Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable parallel for small test coverage runs
`brew tests --coverage` can fail to produce coverage information when run on a small number of tests (e.g., `--only utils/curl`). We use `ParallelTests::last_process?` in `tests/spec_helper.rb` to handle the SimpleCov output but due to the way the method is implemented, it doesn't work as expected if the number of processes is greater than one but lower than the number of cores. I tried to address this through changes to `spec_helper.rb` and/or changes to `ParallelTests` but didn't meet with any success. This works around the issue by disabling parallel test execution when the `--coverage` option is used and the number of files to be tested is lower than the number of CPU cores. I've been using this workaround for months and it works as expected on my machine.
- Loading branch information