mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Simplify spec as there is no easy way to tell if MJIT support is available
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d48783bb02
commit
960d059ef7
1 changed files with 2 additions and 14 deletions
|
@ -39,22 +39,10 @@ describe "The --enable and --disable flags" do
|
|||
|
||||
ruby_version_is "2.6" do
|
||||
it "can be used with jit" do
|
||||
# Only test if it can be disabled, because MJIT does not support all platforms, and
|
||||
# it can be disabled at build time with `./configure --disable-jit-support`.
|
||||
ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable=jit").chomp.should == "false"
|
||||
ruby_exe("p RubyVM::MJIT.enabled?", options: "--disable-jit").chomp.should == "false"
|
||||
|
||||
mjit_disabled = false
|
||||
begin
|
||||
warning = IO.popen([RbConfig.ruby, '--jit-warning', '-e', ''], err: [:child, :out], &:read)
|
||||
mjit_disabled = warning.include?('warning: MJIT support is disabled.') # ./configure --disable-jit-support
|
||||
rescue Errno::ENOENT # for msys2 https://ci.appveyor.com/project/ruby/ruby/builds/23429035/job/dvjqa34m9pxvv2nt
|
||||
end
|
||||
if mjit_disabled
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue