Skip to content

Commit

Permalink
spec_helper: tweak parallel tests handling.
Browse files Browse the repository at this point in the history
- only hide filtered runs in parallel (where they are super noisy)
- only send SimpleCov coverage once to Coveralls
  • Loading branch information
MikeMcQuaid committed Jan 9, 2019
1 parent 04b020d commit 3c270b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Library/Homebrew/test/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

formatters << Coveralls::SimpleCov::Formatter

if ENV["TEST_ENV_NUMBER"]
SimpleCov.at_exit do
result = SimpleCov.result
result.format! if ParallelTests.number_of_running_processes <= 1
end
end

ENV["CI_NAME"] = ENV["HOMEBREW_CI_NAME"]
ENV["CI_JOB_ID"] = ENV["TEST_ENV_NUMBER"] || "1"
ENV["CI_BUILD_NUMBER"] = ENV["HOMEBREW_CI_BUILD_NUMBER"]
Expand Down Expand Up @@ -65,7 +72,7 @@

config.filter_run_when_matching :focus

config.silence_filter_announcements = true
config.silence_filter_announcements = true if ENV["TEST_ENV_NUMBER"]

# TODO: when https://github.com/rspec/rspec-expectations/pull/1056
# makes it into a stable release:
Expand Down

0 comments on commit 3c270b3

Please sign in to comment.