diff options
Diffstat (limited to 'tool')
-rw-r--r-- | tool/test-coverage.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/test-coverage.rb b/tool/test-coverage.rb index 8913d8d435..bb181fa106 100644 --- a/tool/test-coverage.rb +++ b/tool/test-coverage.rb @@ -4,6 +4,12 @@ Coverage.start(lines: true, branches: true, methods: true) TEST_COVERAGE_DATA_FILE = "test-coverage.dat" +FILTER_PATHS = %w[ + tool/lib + lib/bundler/vendor + test +] + def merge_coverage_data(res1, res2) res1.each do |path, cov1| cov2 = res2[path] @@ -77,7 +83,7 @@ def invoke_simplecov_formatter res.each do |path, cov| next unless path.start_with?(base_dir) || path.start_with?(cur_dir) - next if path.start_with?(File.join(base_dir, "test")) + next if FILTER_PATHS.any? {|dir| path.start_with?(File.join(base_dir, dir))} simplecov_result[path] = cov end |