1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/ripper/test_parser_events.rb (test_block_variables): increase RLIMIT_AS

Unfortunately, MJIT goes over the 100M RLIMIT_AS for this test
on x86-64 (Debian 9)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-08-06 08:42:04 +00:00
parent 194a6a2c68
commit 1777e39c2a

View file

@ -1457,8 +1457,11 @@ class TestRipper::ParserEvents < Test::Unit::TestCase
def test_block_variables
assert_equal("[fcall(proc,[],&block([],[void()]))]", parse("proc{|;y|}"))
if defined?(Process::RLIMIT_AS)
assert_in_out_err(["-I#{File.dirname(__FILE__)}", "-rdummyparser"],
'Process.setrlimit(Process::RLIMIT_AS,100*1024*1024); puts DummyParser.new("proc{|;y|!y}").parse',
dir = File.dirname(__FILE__)
as = (RubyVM::MJIT.enabled? ? 111 : 100) * 1024 * 1024
assert_in_out_err(%W(-I#{dir} -rdummyparser),
"Process.setrlimit(Process::RLIMIT_AS,#{as}); "\
"puts DummyParser.new('proc{|;y|!y}').parse",
["[fcall(proc,[],&block([],[unary(!,ref(y))]))]"], [], '[ruby-dev:39423]')
end
end