From e03c1a22c0ed58d1f7778982f0887eb1d2be0d18 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 18 Aug 2020 14:03:15 +0000 Subject: [PATCH 1/2] build(deps): bump simplecov from 0.18.5 to 0.19.0 in /Library/Homebrew Bumps [simplecov](https://github.com/simplecov-ruby/simplecov) from 0.18.5 to 0.19.0. - [Release notes](https://github.com/simplecov-ruby/simplecov/releases) - [Changelog](https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md) - [Commits](https://github.com/simplecov-ruby/simplecov/compare/v0.18.5...v0.19.0) Signed-off-by: dependabot-preview[bot] --- Library/Homebrew/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 527212cc75..408f620de6 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -116,7 +116,7 @@ GEM rubocop (>= 0.87.0) ruby-macho (2.2.0) ruby-progressbar (1.10.1) - simplecov (0.18.5) + simplecov (0.19.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov-html (0.12.2) From 82fc9506ad5ece82904c33545b43dccdc3ddb242 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 18 Aug 2020 15:58:46 +0100 Subject: [PATCH 2/2] simplecov: enable for subprocesses. Follow instructions in: https://github.com/simplecov-ruby/simplecov#running-simplecov-against-subprocesses --- Library/Homebrew/.simplecov | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Library/Homebrew/.simplecov b/Library/Homebrew/.simplecov index 2ed96ecf48..1b1f52138d 100755 --- a/Library/Homebrew/.simplecov +++ b/Library/Homebrew/.simplecov @@ -3,6 +3,8 @@ require "English" +SimpleCov.enable_for_subprocesses true + SimpleCov.start do coverage_dir File.expand_path("../test/coverage", File.realpath(__FILE__)) root File.expand_path("..", File.realpath(__FILE__)) @@ -12,9 +14,21 @@ SimpleCov.start do # tests to be dropped. This causes random fluctuations in test coverage. merge_timeout 86400 + at_fork do |pid| + # This needs a unique name so it won't be ovewritten + command_name "#{SimpleCov.command_name} (#{pid})" + + # be quiet, the parent process will be in charge of output and checking coverage totals + print_error_status = false + end + if ENV["HOMEBREW_INTEGRATION_TEST"] + # This needs a unique name so it won't be ovewritten command_name "#{ENV["HOMEBREW_INTEGRATION_TEST"]} (#{$PROCESS_ID})" + # be quiet, the parent process will be in charge of output and checking coverage totals + print_error_status = false + at_exit do exit_code = $ERROR_INFO.nil? ? 0 : $ERROR_INFO.status $stdout.reopen("/dev/null")