[#1884] multiple exceptions for assert_raises — nobu.nokada@...

Hi,

14 messages 2003/12/04

[#1932] --enable-pthread broken? — Nathaniel Talbott <nathaniel@...>

[ruby-talk: 87759] and the surrounding thread seem to indicate that

29 messages 2003/12/11
[#1933] Re: --enable-pthread broken? — matz@... (Yukihiro Matsumoto) 2003/12/11

Hi,

[#1934] Re: --enable-pthread broken? — Nathaniel Talbott <nathaniel@...> 2003/12/11

On Dec 11, 2003, at 11:49, Yukihiro Matsumoto wrote:

[#1935] Re: --enable-pthread broken? — ts <decoux@...> 2003/12/11

>>>>> "N" == Nathaniel Talbott <nathaniel@talbott.ws> writes:

[#1937] Re: --enable-pthread broken? — nobu.nokada@... 2003/12/11

Hi,

[#1938] Re: --enable-pthread broken? — Nathaniel Talbott <nathaniel@...> 2003/12/12

On Dec 11, 2003, at 16:10, nobu.nokada@softhome.net wrote:

[#1939] Re: --enable-pthread broken? — matz@... (Yukihiro Matsumoto) 2003/12/12

Hi,

[#1941] Re: --enable-pthread broken? — matz@... (Yukihiro Matsumoto) 2003/12/12

Hi,

[#1943] Re: --enable-pthread broken? — Nathaniel Talbott <nathaniel@...> 2003/12/12

On Dec 11, 2003, at 20:48, Yukihiro Matsumoto wrote:

[#1953] Re: --enable-pthread broken? — matz@... (Yukihiro Matsumoto) 2003/12/13

Hi,

[#1959] Re: --enable-pthread broken? — ts <decoux@...> 2003/12/14

>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:

[#1961] Re: --enable-pthread broken? — matz@... (Yukihiro Matsumoto) 2003/12/15

Hi,

[#1962] Re: --enable-pthread broken? — ts <decoux@...> 2003/12/15

>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:

[#1936] Can't define +@ for Symbol (plus ruby install problem) — "T. Onoma" <transami@...>

I wanted to see if the +@ problem was fixed in 1.8.1 preview 3 but when I do

11 messages 2003/12/11

[#1973] Where to install documentation — Dave Thomas <dave@...>

Folks:

48 messages 2003/12/15
[#1982] Re: Where to install documentation — Eric Hodel <drbrain@...7.net> 2003/12/15

Dave Thomas (dave@pragprog.com) wrote:

[#1984] Re: Where to install documentation — Dave Thomas <dave@...> 2003/12/15

[#1991] Re: Where to install documentation — "Gavin Sinclair" <gsinclair@...> 2003/12/16

>

[#1992] Re: Where to install documentation — Dave Thomas <dave@...> 2003/12/16

[#2000] Re: Where to install documentation — Minero Aoki <aamine@...> 2003/12/16

Hi,

[#2002] Re: Where to install documentation — Dave Thomas <dave@...> 2003/12/16

[#2037] --enable-pthread still segfaults... — Nathaniel Talbott <nathaniel@...>

I've finally been able to test my application under load using the

25 messages 2003/12/23
[#2038] Re: --enable-pthread still segfaults... — matz@... (Yukihiro Matsumoto) 2003/12/23

Hi,

[#2039] Re: --enable-pthread still segfaults... — Nathaniel Talbott <nathaniel@...> 2003/12/23

On Dec 23, 2003, at 14:17, Yukihiro Matsumoto wrote:

[#2040] Re: --enable-pthread still segfaults... — matz@... (Yukihiro Matsumoto) 2003/12/23

Hi,

[#2041] Re: --enable-pthread still segfaults... — Nathaniel Talbott <nathaniel@...> 2003/12/23

On Dec 23, 2003, at 14:34, Yukihiro Matsumoto wrote:

[#2042] Re: --enable-pthread still segfaults... — matz@... (Yukihiro Matsumoto) 2003/12/23

Hi,

[#2043] Re: --enable-pthread still segfaults... — Nathaniel Talbott <nathaniel@...> 2003/12/23

On Dec 23, 2003, at 14:44, Yukihiro Matsumoto wrote:

[#2045] Re: --enable-pthread still segfaults... — matz@... (Yukihiro Matsumoto) 2003/12/23

Hi,

[#2046] Re: --enable-pthread still segfaults... — Nathaniel Talbott <nathaniel@...> 2003/12/23

> I'm afraid you're using old configure file. Can you wipe off old

[#2049] Re: --enable-pthread still segfaults... — Nathaniel Talbott <nathaniel@...> 2003/12/23

On Dec 23, 2003, at 15:18, Nathaniel Talbott wrote:

[#2050] Re: --enable-pthread still segfaults... — matz@... (Yukihiro Matsumoto) 2003/12/23

In message "Re: --enable-pthread still segfaults..."

[#2122] Bad interaction between timeout.rb and --enable-pthread — Nathaniel Talbott <nathaniel@...>

Here's a testcase that shows the problem:

13 messages 2003/12/31
[#2123] sleep is broken with --enable-pthread [Was: Bad interaction between timeout.rb and --enable-pthread] — Nathaniel Talbott <nathaniel@...> 2003/12/31

I should have reduced it more before posting...

Re: Test::Unit problem

From: nobu.nokada@...
Date: 2003-12-08 07:40:46 UTC
List: ruby-core #1911
Hi,

At Mon, 8 Dec 2003 01:47:18 +0900,
Sean E. Russell wrote:
> > I guess this "require" line is no longer needed.  This would
> > cause loop at loading.
> 
> Thanks, that was it.  
> 
> If I want backwards compatibility, is the only fix to catch the exception?

The problem is caused by cyclic requiring between
test/unit/autorunner.rb, test/unit/ui/console/testrunner.rb,
test/unit/ui/testrunnermediator.rb and test/unit.rb.

When you require test/unit/ui/console/testrunner.rb, required
test/unit/autorunner.rb requires former again, but it ends with
no effect because it is under loading already, and constants
defined in it cannot be accessed.

In short, the point is that AutoRunner is depending on a particular
test runner, I guess.  And, the other runners never use them?


* lib/test/unit/autorunner.rb: remove dependency to a particular
  runner.  [ruby-core:01901], [ruby-list:38869]

* lib/test/unit/ui/testrunnerutilities.rb: moved output level
  constants from Console.

* lib/test/unit/ui/console/testrunner.rb: ditto.

* lib/test/unit/ui/{fox,gtk,gtk2,tk}/testrunner.rb (initialize):
  accept output_level.

Index: lib/test/unit/autorunner.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/test/unit/autorunner.rb,v
retrieving revision 1.6
diff -u -2 -p -d -r1.6 autorunner.rb
--- lib/test/unit/autorunner.rb	2 Dec 2003 12:31:44 -0000	1.6
+++ lib/test/unit/autorunner.rb	8 Dec 2003 07:23:35 -0000
@@ -1,6 +1,5 @@
+require 'test/unit/ui/testrunnerutilities'
 require 'optparse'
 
-require 'test/unit/ui/console/testrunner'
-          
 module Test
   module Unit
@@ -18,29 +17,30 @@ module Test
       RUNNERS = {
         :console => proc do |r|
-          Test::Unit::UI::Console::TestRunner.run(r.suite, r.output_level)
+          require 'test/unit/ui/console/testrunner'
+          Test::Unit::UI::Console::TestRunner
         end,
         :gtk => proc do |r|
           require 'test/unit/ui/gtk/testrunner'
-          Test::Unit::UI::GTK::TestRunner.run(r.suite)
+          Test::Unit::UI::GTK::TestRunner
         end,
         :gtk2 => proc do |r|
           require 'test/unit/ui/gtk2/testrunner'
-          Test::Unit::UI::GTK2::TestRunner.run(r.suite)
+          Test::Unit::UI::GTK2::TestRunner
         end,
         :fox => proc do |r|
           require 'test/unit/ui/fox/testrunner'
-          Test::Unit::UI::Fox::TestRunner.run(r.suite)
+          Test::Unit::UI::Fox::TestRunner
         end,
         :tk => proc do |r|
           require 'test/unit/ui/tk/testrunner'
-          Test::Unit::UI::Tk::TestRunner.run(r.suite)
+          Test::Unit::UI::Tk::TestRunner
         end,
       }
 
       OUTPUT_LEVELS = {
-        :silent => UI::Console::TestRunner::SILENT,
-        :progress => UI::Console::TestRunner::PROGRESS_ONLY,
-        :normal => UI::Console::TestRunner::NORMAL,
-        :verbose => UI::Console::TestRunner::VERBOSE,
+        :silent => UI::SILENT,
+        :progress => UI::PROGRESS_ONLY,
+        :normal => UI::NORMAL,
+        :verbose => UI::VERBOSE,
       }
 
@@ -72,5 +72,5 @@ module Test
         @filters = []
         @to_run = []
-        @output_level = Test::Unit::UI::Console::TestRunner::NORMAL
+        @output_level = UI::NORMAL
         yield(self) if(block_given?)
       end
@@ -181,5 +181,5 @@ module Test
         @suite = @collector[self]
         result = @runner[self] or return false
-        result.passed?
+        result.run(@suite, @output_level).passed?
       end
     end
Index: lib/test/unit/ui/testrunnerutilities.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/test/unit/ui/testrunnerutilities.rb,v
retrieving revision 1.1.1.2
diff -u -2 -p -d -r1.1.1.2 testrunnerutilities.rb
--- lib/test/unit/ui/testrunnerutilities.rb	12 Feb 2003 04:22:33 -0000	1.1.1.2
+++ lib/test/unit/ui/testrunnerutilities.rb	8 Dec 2003 07:15:12 -0000
@@ -9,4 +9,9 @@ module Test
     module UI
 
+      SILENT = 0
+      PROGRESS_ONLY = 1
+      NORMAL = 2
+      VERBOSE = 3
+
       # Provides some utilities common to most, if not all,
       # TestRunners.
Index: lib/test/unit/ui/console/testrunner.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/test/unit/ui/console/testrunner.rb,v
retrieving revision 1.3
diff -u -2 -p -d -r1.3 testrunner.rb
--- lib/test/unit/ui/console/testrunner.rb	19 Sep 2003 02:48:46 -0000	1.3
+++ lib/test/unit/ui/console/testrunner.rb	8 Dec 2003 07:16:22 -0000
@@ -17,9 +17,4 @@ module Test
           extend TestRunnerUtilities
           
-          SILENT = 0
-          PROGRESS_ONLY = 1
-          NORMAL = 2
-          VERBOSE = 3
-
           # Creates a new TestRunner and runs the suite.
           def self.run(suite, output_level=NORMAL)
Index: lib/test/unit/ui/fox/testrunner.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/test/unit/ui/fox/testrunner.rb,v
retrieving revision 1.2
diff -u -2 -p -d -r1.2 testrunner.rb
--- lib/test/unit/ui/fox/testrunner.rb	2 Dec 2003 12:31:44 -0000	1.2
+++ lib/test/unit/ui/fox/testrunner.rb	8 Dec 2003 07:20:33 -0000
@@ -35,5 +35,5 @@ module Test
           # Creates a new TestRunner for running the passed
           # suite.
-          def initialize(suite)
+          def initialize(suite, output_level = NORMAL)
             if (suite.respond_to?(:suite))
               @suite = suite.suite
Index: lib/test/unit/ui/gtk/testrunner.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/test/unit/ui/gtk/testrunner.rb,v
retrieving revision 1.6
diff -u -2 -p -d -r1.6 testrunner.rb
--- lib/test/unit/ui/gtk/testrunner.rb	2 Dec 2003 12:31:44 -0000	1.6
+++ lib/test/unit/ui/gtk/testrunner.rb	8 Dec 2003 07:20:06 -0000
@@ -28,5 +28,5 @@ module Test
           # Creates a new TestRunner for running the passed
           # suite.
-          def initialize(suite)
+          def initialize(suite, output_level = NORMAL)
             if (suite.respond_to?(:suite))
               @suite = suite.suite
Index: lib/test/unit/ui/gtk2/testrunner.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/test/unit/ui/gtk2/testrunner.rb,v
retrieving revision 1.4
diff -u -2 -p -d -r1.4 testrunner.rb
--- lib/test/unit/ui/gtk2/testrunner.rb	2 Dec 2003 12:41:01 -0000	1.4
+++ lib/test/unit/ui/gtk2/testrunner.rb	8 Dec 2003 07:20:19 -0000
@@ -441,5 +441,5 @@ module Test
           end # def start
 
-          def initialize(suite)
+          def initialize(suite, output_level = NORMAL)
             if suite.respond_to?(:suite) then
               @suite = suite.suite
Index: lib/test/unit/ui/tk/testrunner.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/test/unit/ui/tk/testrunner.rb,v
retrieving revision 1.6
diff -u -2 -p -d -r1.6 testrunner.rb
--- lib/test/unit/ui/tk/testrunner.rb	2 Dec 2003 12:31:44 -0000	1.6
+++ lib/test/unit/ui/tk/testrunner.rb	8 Dec 2003 07:19:54 -0000
@@ -29,5 +29,5 @@ module Test
           # Creates a new TestRunner for running the passed
           # suite.
-          def initialize(suite)
+          def initialize(suite, output_level = NORMAL)
             if (suite.respond_to?(:suite))
               @suite = suite.suite


-- 
Nobu Nakada

In This Thread