Skip to content

Commit

Permalink
Avoid failing test_enable on warnings
Browse files Browse the repository at this point in the history
This fails on RubyCI due to RJIT warnings too often. It should be enough
to test RJIT feature in test_rjit_version. We only want warnings instead
of test failures when there are warnings, at least for this case.
  • Loading branch information
k0kubun committed Apr 3, 2023
1 parent 3cb5e75 commit ba4ff25
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/ruby/test_rubyoptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,15 @@ def test_copyright
end

def test_enable
if JITSupport.yjit_supported? || JITSupport.rjit_supported?
if JITSupport.yjit_supported?
assert_in_out_err(%w(--enable all -e) + [""], "", [], [])
assert_in_out_err(%w(--enable-all -e) + [""], "", [], [])
assert_in_out_err(%w(--enable=all -e) + [""], "", [], [])
elsif JITSupport.rjit_supported?
# Avoid failing tests by RJIT warnings
assert_in_out_err(%w(--enable all --disable rjit -e) + [""], "", [], [])
assert_in_out_err(%w(--enable-all --disable-rjit -e) + [""], "", [], [])
assert_in_out_err(%w(--enable=all --disable=rjit -e) + [""], "", [], [])
end
assert_in_out_err(%w(--enable foobarbazqux -e) + [""], "", [],
/unknown argument for --enable: `foobarbazqux'/)
Expand Down

0 comments on commit ba4ff25

Please sign in to comment.