diff options
| author | Markus Reiter | 2016-09-25 00:51:09 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-09-25 19:55:34 +0200 |
| commit | c8492c2c4444dbb4a67dff4a9e65747bc4252b78 (patch) | |
| tree | 5b4eff3d23fac231e3a7bf7bd9eaab9e570ab8f7 | |
| parent | 6e5735565b9a31ec2b01e02a479a361189729c22 (diff) | |
| download | brew-c8492c2c4444dbb4a67dff4a9e65747bc4252b78.tar.bz2 | |
RuboCop: Style/SpecialGlobalVars
| -rwxr-xr-x | Library/Homebrew/.simplecov | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/.simplecov b/Library/Homebrew/.simplecov index bc4ed7bb1..952bb466b 100755 --- a/Library/Homebrew/.simplecov +++ b/Library/Homebrew/.simplecov @@ -1,5 +1,7 @@ #!/usr/bin/env ruby +require "english" + SimpleCov.start do coverage_dir File.expand_path("../test/coverage", File.realpath(__FILE__)) root File.expand_path("..", File.realpath(__FILE__)) @@ -16,9 +18,9 @@ SimpleCov.start do add_filter "/Homebrew/vendor/" if ENV["HOMEBREW_INTEGRATION_TEST"] - command_name "#{ENV["HOMEBREW_INTEGRATION_TEST"]} (#{$$})" + command_name "#{ENV["HOMEBREW_INTEGRATION_TEST"]} (#{$PROCESS_ID})" at_exit do - exit_code = $!.nil? ? 0 : $!.status + exit_code = $ERROR_INFO.nil? ? 0 : $ERROR_INFO.status $stdout.reopen("/dev/null") # Just save result, but don't write formatted output. @@ -30,7 +32,7 @@ SimpleCov.start do exit! exit_code end else - command_name "#{command_name} (#{$$})" + command_name "#{command_name} (#{$PROCESS_ID})" # Not using this during integration tests makes the tests 4x times faster # without changing the coverage. track_files "#{SimpleCov.root}/**/*.rb" |
