diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-11 11:09:59 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-11 11:09:59 +0000 |
commit | 0f3bd3e6a8e0cfb9049a32504b3add02fff40862 (patch) | |
tree | fb04bea9743d9292e5ae0b04b8d65df10c2687b9 /test/ruby/test_jit.rb | |
parent | 6f7fafbf004af03cc476648be02c9dc3cc1b4f3d (diff) | |
download | ruby-0f3bd3e6a8e0cfb9049a32504b3add02fff40862.tar.gz |
test_jit.rb: show extra debug info for #test_unload_units
failure
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_jit.rb')
-rw-r--r-- | test/ruby/test_jit.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index 3fbc26cd15..50f318c2a7 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -580,24 +580,26 @@ class TestJIT < Test::Unit::TestCase i += 1 end end; - assert_equal('012345678910', out) + + debug_info = "stdout:\n```\n#{out}\n```\n\nstderr:\n```\n#{err}```\n" + assert_equal('012345678910', out, debug_info) compactions, errs = err.lines.partition do |l| l.match?(/\AJIT compaction \(\d+\.\dms\): Compacted \d+ methods ->/) end 10.times do |i| - assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit#{i}@\(eval\):/, errs[i]) + assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit#{i}@\(eval\):/, errs[i], debug_info) end - assert_equal("Too many JIT code -- 1 units unloaded\n", errs[10]) - assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit10@\(eval\):/, errs[11]) + assert_equal("Too many JIT code -- 1 units unloaded\n", errs[10], debug_info) + assert_match(/\A#{JIT_SUCCESS_PREFIX}: mjit10@\(eval\):/, errs[11], debug_info) # On --jit-wait, when the number of JIT-ed code reaches --jit-max-cache, # it should trigger compaction. unless RUBY_PLATFORM.match?(/mswin|mingw/) # compaction is not supported on Windows yet - assert_equal(2, compactions.size) + assert_equal(2, compactions.size, debug_info) end # verify .o files are deleted on unload_units - assert_send([Dir, :empty?, dir]) + assert_send([Dir, :empty?, dir], debug_info) end end |