ruby-changes:50176
From: k0kubun <ko1@a...>
Date: Thu, 8 Feb 2018 01:28:23 +0900 (JST)
Subject: [ruby-changes:50176] k0kubun:r62294 (trunk): test_jit.rb: make JIT count test optional
k0kubun 2018-02-08 01:28:17 +0900 (Thu, 08 Feb 2018) New Revision: 62294 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62294 Log: test_jit.rb: make JIT count test optional Modified files: trunk/test/ruby/test_jit.rb Index: test/ruby/test_jit.rb =================================================================== --- test/ruby/test_jit.rb (revision 62293) +++ test/ruby/test_jit.rb (revision 62294) @@ -24,12 +24,14 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L24 # Shorthand for normal test cases def assert_eval_with_jit(script, stdout: nil, success_count:) out, err = eval_with_jit(script, verbose: 1, min_calls: 1) - actual = err.scan(/^#{JIT_SUCCESS_PREFIX}:/).size - assert_equal( - success_count, actual, - "Expected #{success_count} times of JIT success, but succeeded #{actual} times.\n\n"\ - "script:\n#{code_block(script)}\nstderr:\n#{code_block(err)}", - ) + if jit_available? + actual = err.scan(/^#{JIT_SUCCESS_PREFIX}:/).size + assert_equal( + success_count, actual, + "Expected #{success_count} times of JIT success, but succeeded #{actual} times.\n\n"\ + "script:\n#{code_block(script)}\nstderr:\n#{code_block(err)}", + ) + end if stdout assert_match(stdout, out, "Expected stderr #{out.inspect} to match #{stdout.inspect} with script:\n#{code_block(script)}") end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/