Only check constant leaks by default for make test-spec
* See https://github.com/ruby/ruby/pull/9548
This commit is contained in:
parent
6f9ca7f453
commit
d24be39d69
@ -4,8 +4,8 @@ if (opt = ENV["RUBYOPT"]) and (opt = opt.dup).sub!(/(?:\A|\s)-w(?=\z|\s)/, '')
|
|||||||
ENV["RUBYOPT"] = opt
|
ENV["RUBYOPT"] = opt
|
||||||
end
|
end
|
||||||
|
|
||||||
# Enable leakcheckers by ruby/mspec
|
# Enable constant leak checks by ruby/mspec
|
||||||
ENV["CHECK_LEAKS"] ||= "true"
|
ENV["CHECK_CONSTANT_LEAKS"] ||= "true"
|
||||||
|
|
||||||
require "./rbconfig" unless defined?(RbConfig)
|
require "./rbconfig" unless defined?(RbConfig)
|
||||||
require_relative "../tool/test-coverage" if ENV.key?("COVERAGE")
|
require_relative "../tool/test-coverage" if ENV.key?("COVERAGE")
|
||||||
|
@ -5,6 +5,9 @@ require 'mspec/utils/options'
|
|||||||
|
|
||||||
if ENV['CHECK_LEAKS']
|
if ENV['CHECK_LEAKS']
|
||||||
require 'mspec/runner/actions/leakchecker'
|
require 'mspec/runner/actions/leakchecker'
|
||||||
|
end
|
||||||
|
|
||||||
|
if ENV['CHECK_LEAKS'] || ENV['CHECK_CONSTANT_LEAKS']
|
||||||
require 'mspec/runner/actions/constants_leak_checker'
|
require 'mspec/runner/actions/constants_leak_checker'
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -40,8 +43,11 @@ class BaseFormatter
|
|||||||
@counter = @tally.counter
|
@counter = @tally.counter
|
||||||
|
|
||||||
if ENV['CHECK_LEAKS']
|
if ENV['CHECK_LEAKS']
|
||||||
save = ENV['CHECK_LEAKS'] == 'save'
|
|
||||||
LeakCheckerAction.new.register
|
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
|
ConstantsLeakCheckerAction.new(save).register
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user