summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-25 03:34:27 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-25 03:34:27 +0000
commit36c9605a6edbb69c2c8ebaf11a75b48a57934863 (patch)
tree7a7a8229e9fe7a64c9ad945e00f9c57063e7a4a3
parentc3abc41532b2e287dab397cf305a457ff01877fa (diff)
* test/lib/minitest/unit.rb: Sort leaked threads and tempfiles.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--test/lib/minitest/unit.rb9
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bcbb418894..3a9011d6c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun May 25 12:32:42 2014 Tanaka Akira <akr@fsij.org>
+
+ * test/lib/minitest/unit.rb: Sort leaked threads and tempfiles.
+
Sun May 25 12:15:30 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* signal.c (check_stack_overflow): fix condition to use ucontext
diff --git a/test/lib/minitest/unit.rb b/test/lib/minitest/unit.rb
index 6f686ac85e..49d3809cb9 100644
--- a/test/lib/minitest/unit.rb
+++ b/test/lib/minitest/unit.rb
@@ -964,15 +964,18 @@ module MiniTest
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