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

ruby-changes:20062

From: sorah <ko1@a...>
Date: Thu, 16 Jun 2011 07:27:25 +0900 (JST)
Subject: [ruby-changes:20062] sorah:r32109 (trunk): * lib/test/unit.rb(Test::Unit::Runner#_run_parallel): Ignore -j0

sorah	2011-06-16 07:27:11 +0900 (Thu, 16 Jun 2011)

  New Revision: 32109

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32109

  Log:
    * lib/test/unit.rb(Test::Unit::Runner#_run_parallel): Ignore -j0
      because it makes blocking forever by IO.select.

  Modified files:
    trunk/ChangeLog
    trunk/lib/test/unit.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32108)
+++ ChangeLog	(revision 32109)
@@ -1,3 +1,8 @@
+Thu Jun 16 07:20:06 2011  Shota Fukumori  <sorah@t...>
+
+	* lib/test/unit.rb(Test::Unit::Runner#_run_parallel): Ignore -j0
+	  because it makes blocking forever by IO.select.
+
 Thu Jun 16 03:08:11 2011  NAKAMURA Usaku  <usa@r...>
 
 	* test/testunit/test_parallel.rb (TestParallel::TestParallelWorker#
Index: lib/test/unit.rb
===================================================================
--- lib/test/unit.rb	(revision 32108)
+++ lib/test/unit.rb	(revision 32109)
@@ -388,6 +388,11 @@
       end
 
       def _run_parallel suites, type, result
+        if @opts[:parallel] < 1
+          warn "Error: parameter of -j option should be greater than 0."
+          return
+        end
+
         begin
           # Require needed things for parallel running
           require 'thread'

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

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