Merge pull request #14674 from issyl0/shorter-code-coverage-output
simplecov: Set `command_name` shorter than "all of the file paths ever"
This commit is contained in:
commit
a59f5eb524
@ -8,6 +8,7 @@ SimpleCov.enable_for_subprocesses true
|
|||||||
SimpleCov.start do
|
SimpleCov.start do
|
||||||
coverage_dir File.expand_path("../test/coverage", File.realpath(__FILE__))
|
coverage_dir File.expand_path("../test/coverage", File.realpath(__FILE__))
|
||||||
root File.expand_path("..", File.realpath(__FILE__))
|
root File.expand_path("..", File.realpath(__FILE__))
|
||||||
|
command_name "brew"
|
||||||
|
|
||||||
# enables branch coverage as well as, the default, line coverage
|
# enables branch coverage as well as, the default, line coverage
|
||||||
enable_coverage :branch
|
enable_coverage :branch
|
||||||
@ -17,10 +18,7 @@ SimpleCov.start do
|
|||||||
# tests to be dropped. This causes random fluctuations in test coverage.
|
# tests to be dropped. This causes random fluctuations in test coverage.
|
||||||
merge_timeout 86400
|
merge_timeout 86400
|
||||||
|
|
||||||
at_fork do |pid|
|
at_fork do
|
||||||
# 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
|
# be quiet, the parent process will be in charge of output and checking coverage totals
|
||||||
SimpleCov.print_error_status = false
|
SimpleCov.print_error_status = false
|
||||||
end
|
end
|
||||||
@ -31,8 +29,8 @@ SimpleCov.start do
|
|||||||
files = "#{SimpleCov.root}/{#{subdirs},*.rb}"
|
files = "#{SimpleCov.root}/{#{subdirs},*.rb}"
|
||||||
|
|
||||||
if ENV["HOMEBREW_INTEGRATION_TEST"]
|
if ENV["HOMEBREW_INTEGRATION_TEST"]
|
||||||
# This needs a unique name so it won't be ovewritten
|
# This needs a unique name so it won't be overwritten
|
||||||
command_name "#{ENV["HOMEBREW_INTEGRATION_TEST"]} (#{$PROCESS_ID})"
|
command_name "i#{ENV.fetch("TEST_ENV_NUMBER", $PROCESS_ID)}"
|
||||||
|
|
||||||
# be quiet, the parent process will be in charge of output and checking coverage totals
|
# be quiet, the parent process will be in charge of output and checking coverage totals
|
||||||
SimpleCov.print_error_status = false
|
SimpleCov.print_error_status = false
|
||||||
@ -53,7 +51,7 @@ SimpleCov.start do
|
|||||||
raise if $ERROR_INFO.is_a?(SystemExit)
|
raise if $ERROR_INFO.is_a?(SystemExit)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
command_name "#{command_name} (#{$PROCESS_ID})"
|
command_name "b#{ENV.fetch("TEST_ENV_NUMBER", $PROCESS_ID)}"
|
||||||
|
|
||||||
# Not using this during integration tests makes the tests 4x times faster
|
# Not using this during integration tests makes the tests 4x times faster
|
||||||
# without changing the coverage.
|
# without changing the coverage.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user