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 46cb9ec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Library/Homebrew/test/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
]
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.result` calls `ParallelTests.wait_for_other_processes_to_finish`
# internally for you on the last process.
result.format! if ParallelTests.last_process?
end
end
Expand Down

0 comments on commit 46cb9ec

Please sign in to comment.