diff options
| author | Markus Reiter | 2017-03-05 08:06:45 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-03-05 23:08:14 +0100 |
| commit | 4944d43d580140af94c0b19a7dbb50bb36b7593a (patch) | |
| tree | ace204f01199e8d015a8e1205b9b5da1e891d231 /Library/Homebrew/test | |
| parent | bba2c632ec972eab5289e5114908eff28eb82be9 (diff) | |
| download | brew-4944d43d580140af94c0b19a7dbb50bb36b7593a.tar.bz2 | |
Move coverage reporting into `brew tests`.
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/spec_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/test/spec_helper.rb b/Library/Homebrew/test/spec_helper.rb index 4616d7708..af414b145 100644 --- a/Library/Homebrew/test/spec_helper.rb +++ b/Library/Homebrew/test/spec_helper.rb @@ -1,4 +1,5 @@ require "find" +require "parallel_tests" require "pathname" require "rspec/its" require "rspec/wait" @@ -6,6 +7,20 @@ require "set" if ENV["HOMEBREW_TESTS_COVERAGE"] require "simplecov" + + if ENV["CODECOV_TOKEN"] || ENV["TRAVIS"] + require "codecov" + + if ParallelTests.last_process? + at_exit do + ParallelTests.wait_for_other_processes_to_finish + + puts "Sending coverage report to CodeCov …" + formatter = SimpleCov::Formatter::Codecov.new + formatter.format SimpleCov::ResultMerger.merged_result + end + end + end end $LOAD_PATH.unshift(File.expand_path("#{ENV["HOMEBREW_LIBRARY"]}/Homebrew")) |
