Do not fail with --disable-jit-support

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2019-03-28 15:25:43 +00:00
Родитель a28aa80c73
Коммит 68987d4ae1
1 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -39,10 +39,17 @@ describe "The --enable and --disable flags" do
ruby_version_is "2.6" do ruby_version_is "2.6" do
it "can be used with jit" do it "can be used with jit" do
ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable=jit").chomp.should == "true"
ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable=jit").chomp.should == "false" ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable=jit").chomp.should == "false"
ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable-jit").chomp.should == "true"
ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable-jit").chomp.should == "false" ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable-jit").chomp.should == "false"
warning = IO.popen([RbConfig.ruby, '--jit-warning', '-e', ''], err: [:child, :out], &:read)
if warning.include?('warning: MJIT support is disabled.') # ./configure --disable-jit-support
ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable=jit").chomp.should == "false"
ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable-jit").chomp.should == "false"
else
ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable=jit").chomp.should == "true"
ruby_exe("p RubyVM::MJIT.enabled?", options: "--enable-jit").chomp.should == "true"
end
end end
end end