[前][次][番号順一覧][スレッド一覧]

ruby-changes:56654

From: Nobuyoshi <ko1@a...>
Date: Thu, 25 Jul 2019 12:49:29 +0900 (JST)
Subject: [ruby-changes:56654] Nobuyoshi Nakada: a850be68a5 (master): Moved NoMemoryError hook to Test::Unit::AutoRunner

https://git.ruby-lang.org/ruby.git/commit/?id=a850be68a5

From a850be68a57dce65449766654aa1912b5fa660cb Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 24 Jul 2019 11:04:26 +0900
Subject: Moved NoMemoryError hook to Test::Unit::AutoRunner


diff --git a/tool/lib/test/unit.rb b/tool/lib/test/unit.rb
index 1034a99..146d6bb 100644
--- a/tool/lib/test/unit.rb
+++ b/tool/lib/test/unit.rb
@@ -1135,6 +1135,10 @@ module Test https://github.com/ruby/ruby/blob/trunk/tool/lib/test/unit.rb#L1135
           abort @options.banner
         end
         @runner.run(@argv) || true
+      rescue NoMemoryError
+        system("cat /proc/meminfo") if File.exist?("/proc/meminfo")
+        system("ps x -opid,args,%cpu,%mem,nlwp,rss,vsz,wchan,stat,start,time,etime,blocked,caught,ignored,pending,f") if File.exist?("/bin/ps")
+        raise
       end
 
       def self.run(*args)
diff --git a/tool/test/runner.rb b/tool/test/runner.rb
index f876985..38e7c04 100644
--- a/tool/test/runner.rb
+++ b/tool/test/runner.rb
@@ -35,10 +35,4 @@ if ENV['COVERAGE'] https://github.com/ruby/ruby/blob/trunk/tool/test/runner.rb#L35
   require_relative "#{tool_dir}/test-coverage.rb"
 end
 
-begin
-  exit Test::Unit::AutoRunner.run(true, src_testdir)
-rescue NoMemoryError
-  system("cat /proc/meminfo") if File.exist?("/proc/meminfo")
-  system("ps x -opid,args,%cpu,%mem,nlwp,rss,vsz,wchan,stat,start,time,etime,blocked,caught,ignored,pending,f") if File.exist?("/bin/ps")
-  raise
-end
+exit Test::Unit::AutoRunner.run(true, src_testdir)
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]