mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_open3.rb: let test_popen2 work with --jit
test/lib/jit_support.rb: add .remove_mjit_logs to normalize stderr git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6090206275
commit
d025f64a9f
2 changed files with 10 additions and 1 deletions
|
@ -33,4 +33,12 @@ module JITSupport
|
|||
err.match?(JIT_SUCCESS_PREFIX)
|
||||
end
|
||||
end
|
||||
|
||||
def remove_mjit_logs(stderr)
|
||||
if RubyVM::MJIT.enabled?
|
||||
stderr.gsub(/^MJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '')
|
||||
else
|
||||
stderr
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
require 'test/unit'
|
||||
require 'open3'
|
||||
require_relative 'lib/jit_support'
|
||||
|
||||
class TestOpen3 < Test::Unit::TestCase
|
||||
RUBY = EnvUtil.rubybin
|
||||
|
@ -126,7 +127,7 @@ class TestOpen3 < Test::Unit::TestCase
|
|||
i.close
|
||||
STDERR.reopen(old)
|
||||
assert_equal("zo", o.read)
|
||||
assert_equal("ze", r.read)
|
||||
assert_equal("ze", JITSupport.remove_mjit_logs(r.read))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue