ruby-changes:34023
From: akr <ko1@a...>
Date: Sun, 25 May 2014 12:34:43 +0900 (JST)
Subject: [ruby-changes:34023] akr:r46104 (trunk): * test/lib/minitest/unit.rb: Sort leaked threads and tempfiles.
akr 2014-05-25 12:34:27 +0900 (Sun, 25 May 2014) New Revision: 46104 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46104 Log: * test/lib/minitest/unit.rb: Sort leaked threads and tempfiles. Modified files: trunk/ChangeLog trunk/test/lib/minitest/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 46103) +++ ChangeLog (revision 46104) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun May 25 12:32:42 2014 Tanaka Akira <akr@f...> + + * test/lib/minitest/unit.rb: Sort leaked threads and tempfiles. + Sun May 25 12:15:30 2014 Nobuyoshi Nakada <nobu@r...> * signal.c (check_stack_overflow): fix condition to use ucontext Index: test/lib/minitest/unit.rb =================================================================== --- test/lib/minitest/unit.rb (revision 46103) +++ test/lib/minitest/unit.rb (revision 46104) @@ -964,15 +964,18 @@ module MiniTest https://github.com/ruby/ruby/blob/trunk/test/lib/minitest/unit.rb#L964 live2 = live_thread_and_tempfile thread_finished = live1[0] - live2[0] if !thread_finished.empty? - puts "Finished threads: #{inst.class}\##{inst.__name__}:#{thread_finished.map {|t| ' ' + t.inspect }.join}" + list = thread_finished.map {|t| ' ' + t.inspect }.sort.join + puts "Finished threads: #{inst.class}\##{inst.__name__}:#{list}" end thread_retained = live2[0] - live1[0] if !thread_retained.empty? - puts "Leaked threads: #{inst.class}\##{inst.__name__}:#{thread_retained.map {|t| ' ' + t.inspect }.join}" + list = thread_retained.map {|t| ' ' + t.inspect }.sort.join + puts "Leaked threads: #{inst.class}\##{inst.__name__}:#{list}" end tempfile_retained = live2[1] - live1[1] if !tempfile_retained.empty? - puts "Leaked tempfiles: #{inst.class}\##{inst.__name__}:#{tempfile_retained.map {|t| ' ' + t.inspect }.join}" + list = tempfile_retained.map {|t| ' ' + t.inspect }.sort.join + puts "Leaked tempfiles: #{inst.class}\##{inst.__name__}:#{list}" tempfile_retained.each {|t| t.unlink } end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/