Skip to content

Commit

Permalink
spec_helper: clarify comment and scope to all OS
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Oct 27, 2024
1 parent 92fee90 commit c7a47b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Library/Homebrew/test/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
]
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(formatters)

# Needed for outputting coverage reporting only once for parallel_tests
if RUBY_PLATFORM[/darwin/] && ENV["TEST_ENV_NUMBER"]
# Needed for outputting coverage reporting only once for parallel_tests.
# Otherwise, "Coverage report generated" will get spammed for each process.
if ENV["TEST_ENV_NUMBER"]
SimpleCov.at_exit do
result = SimpleCov.result
# SimpleCov calls `ParallelTests.wait_for_other_processes_to_finish` internally for you.
result.format! if ParallelTests.last_process?
end
end
Expand Down

0 comments on commit c7a47b1

Please sign in to comment.