summaryrefslogtreecommitdiff
path: root/tool/test-coverage.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-05 01:05:16 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-05 01:05:16 +0000
commit4a7bf2efe702b64183259828de470d14df0f0031 ()
tree68135382100ff5f2541a5f7c48e07152fb4af82e /tool/test-coverage.rb
parent97d610becd9f1c9e4e6a17aeffc381f937193f7f (diff)
`make test-all COVERAGE=true` supports directory-separated build
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--tool/test-coverage.rb17
1 files changed, 16 insertions, 1 deletions
@@ -70,13 +70,28 @@ def invoke_simplecov_formatter
res = Marshal.load(File.binread(TEST_COVERAGE_DATA_FILE))
simplecov_result = {}
base_dir = File.dirname(__dir__)
res.each do |path, cov|
- next unless path.start_with?(base_dir)
next if path.start_with?(File.join(base_dir, "test"))
simplecov_result[path] = cov[:lines]
end
res = SimpleCov::Result.new(simplecov_result)
res.command_name = "Ruby's `make test-all`"
SimpleCov::Formatter::HTMLFormatter.new.format(res)