aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/.simplecov24
1 files changed, 11 insertions, 13 deletions
diff --git a/Library/Homebrew/test/.simplecov b/Library/Homebrew/test/.simplecov
index f4af3eeba..3dec7d3b7 100644
--- a/Library/Homebrew/test/.simplecov
+++ b/Library/Homebrew/test/.simplecov
@@ -13,9 +13,17 @@ SimpleCov.start do
add_filter "Homebrew/vendor/"
add_filter "Taps/"
- # Not using this during integration tests makes the tests 4x times faster
- # without changing the coverage.
- unless ENV["HOMEBREW_INTEGRATION_TEST"]
+ if ENV["HOMEBREW_INTEGRATION_TEST"]
+ command_name ENV["HOMEBREW_INTEGRATION_TEST"]
+ at_exit do
+ exit_code = $!.nil? ? 0 : $!.status
+ $stdout.reopen("/dev/null")
+ SimpleCov.result # Just save result, but don't write formatted output.
+ exit! exit_code
+ end
+ else
+ # Not using this during integration tests makes the tests 4x times faster
+ # without changing the coverage.
track_files "#{SimpleCov.root}/**/*.rb"
end
@@ -33,16 +41,6 @@ SimpleCov.start do
]
end
-if ENV["HOMEBREW_INTEGRATION_TEST"]
- SimpleCov.command_name ENV["HOMEBREW_INTEGRATION_TEST"]
- SimpleCov.at_exit do
- exit_code = $!.nil? ? 0 : $!.status
- $stdout.reopen("/dev/null")
- SimpleCov.result # Just save result, but don't write formatted output.
- exit! exit_code
- end
-end
-
# Don't use Coveralls outside of CI, as it will override SimpleCov's default
# formatter causing the `index.html` not to be written once all tests finish.
if RUBY_VERSION.split(".").first.to_i >= 2 && !ENV["HOMEBREW_INTEGRATION_TEST"] && ENV["CI"]