about summary refs log tree commit homepage
path: root/test/server_helper.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-22 18:57:56 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-22 19:19:27 +0000
commit6aa8ec217362c058d37340a8ec314e68810e99a9 (patch)
treec532f1cd82a638bdb4800c167b8fb9f645c0c9b5 /test/server_helper.rb
parent927b4e7a23cdf582eac9d9bf87a3403c647ad01b (diff)
downloadyahns-6aa8ec217362c058d37340a8ec314e68810e99a9.tar.gz
We should see the reason for test failures.
Diffstat (limited to 'test/server_helper.rb')
-rw-r--r--test/server_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/server_helper.rb b/test/server_helper.rb
index 812e91b..89276b8 100644
--- a/test/server_helper.rb
+++ b/test/server_helper.rb
@@ -29,10 +29,15 @@ module ServerHelper
 
   def quit_wait(pid)
     pid or return
+    err = $!
     Process.kill(:QUIT, pid)
     _, status = Timeout.timeout(10) { Process.waitpid2(pid) }
     assert status.success?, status.inspect
   rescue Timeout::Error
+    begin
+      warn "#{err.message} (#{err.class})"
+      err.backtrace.each { |l| warn l }
+    end
     if RUBY_PLATFORM =~ /linux/
       system("lsof -p #{pid}")
       warn "#{pid} failed to die, waiting for user to inspect"