зеркало из https://github.com/github/ruby.git
Only check constant leaks by default for `make test-spec`
* See https://github.com/ruby/ruby/pull/9548
This commit is contained in:
Родитель
6f9ca7f453
Коммит
d24be39d69
|
@ -4,8 +4,8 @@ if (opt = ENV["RUBYOPT"]) and (opt = opt.dup).sub!(/(?:\A|\s)-w(?=\z|\s)/, '')
|
|||
ENV["RUBYOPT"] = opt
|
||||
end
|
||||
|
||||
# Enable leakcheckers by ruby/mspec
|
||||
ENV["CHECK_LEAKS"] ||= "true"
|
||||
# Enable constant leak checks by ruby/mspec
|
||||
ENV["CHECK_CONSTANT_LEAKS"] ||= "true"
|
||||
|
||||
require "./rbconfig" unless defined?(RbConfig)
|
||||
require_relative "../tool/test-coverage" if ENV.key?("COVERAGE")
|
||||
|
|
|
@ -5,6 +5,9 @@ require 'mspec/utils/options'
|
|||
|
||||
if ENV['CHECK_LEAKS']
|
||||
require 'mspec/runner/actions/leakchecker'
|
||||
end
|
||||
|
||||
if ENV['CHECK_LEAKS'] || ENV['CHECK_CONSTANT_LEAKS']
|
||||
require 'mspec/runner/actions/constants_leak_checker'
|
||||
end
|
||||
|
||||
|
@ -40,8 +43,11 @@ class BaseFormatter
|
|||
@counter = @tally.counter
|
||||
|
||||
if ENV['CHECK_LEAKS']
|
||||
save = ENV['CHECK_LEAKS'] == 'save'
|
||||
LeakCheckerAction.new.register
|
||||
end
|
||||
|
||||
if ENV['CHECK_LEAKS'] || ENV['CHECK_CONSTANT_LEAKS']
|
||||
save = ENV['CHECK_LEAKS'] == 'save' || ENV['CHECK_CONSTANT_LEAKS'] == 'save'
|
||||
ConstantsLeakCheckerAction.new(save).register
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче