1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_jit.rb: add debugging output

Sometimes gcc fails to exec cc1 like this:
https://gist.github.com/ko1/c3db8b193e9cc65c39c541e10d957509

I'm not sure why it happens at all. Please let me add this debugging
output to inspect the random failure on CI for now.
I'll remove this after we confirm it's not helpful.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-03-11 09:32:48 +00:00
parent 6679ffd3b5
commit 31b6ac1b9a

View file

@ -545,6 +545,13 @@ class TestJIT < Test::Unit::TestCase
def assert_eval_with_jit(script, stdout: nil, success_count:, min_calls: 1) def assert_eval_with_jit(script, stdout: nil, success_count:, min_calls: 1)
out, err = eval_with_jit(script, verbose: 1, min_calls: min_calls) out, err = eval_with_jit(script, verbose: 1, min_calls: min_calls)
actual = err.scan(/^#{JIT_SUCCESS_PREFIX}:/).size actual = err.scan(/^#{JIT_SUCCESS_PREFIX}:/).size
# Debugging on CI
if stderr.include?("gcc: error trying to exec 'cc1': execvp: No such file or directory")
puts "test/ruby/test_jit.rb: ENV content:"
pp ENV
end
assert_equal( assert_equal(
success_count, actual, success_count, actual,
"Expected #{success_count} times of JIT success, but succeeded #{actual} times.\n\n"\ "Expected #{success_count} times of JIT success, but succeeded #{actual} times.\n\n"\