From ba4ff2552e9bca762f0953e5697438efebe22547 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 3 Apr 2023 08:52:46 -0700 Subject: [PATCH] Avoid failing test_enable on warnings 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. --- test/ruby/test_rubyoptions.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 64d8d93d3f..6aacb80d2f 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -172,10 +172,15 @@ class TestRubyOptions < Test::Unit::TestCase 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'/)