ruby-changes:52472
From: k0kubun <ko1@a...>
Date: Tue, 11 Sep 2018 20:10:05 +0900 (JST)
Subject: [ruby-changes:52472] k0kubun:r64681 (trunk): test_jit.rb: show extra debug info for #test_unload_units
k0kubun 2018-09-11 20:09:59 +0900 (Tue, 11 Sep 2018) New Revision: 64681 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64681 Log: test_jit.rb: show extra debug info for #test_unload_units failure Modified files: trunk/test/ruby/test_jit.rb Index: test/ruby/test_jit.rb =================================================================== --- test/ruby/test_jit.rb (revision 64680) +++ test/ruby/test_jit.rb (revision 64681) @@ -580,24 +580,26 @@ class TestJIT < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_jit.rb#L580 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/