Project

General

Profile

Actions

Bug #617

closed

rubygems depend on test/unit/ui/console/testrunner

Added by mame (Yusuke Endoh) about 16 years ago. Updated over 13 years ago.

Status:
Closed
ruby -v:
Backport:
[ruby-core:19168]

Description

=begin
Hi,

Executing gem with --test may fail because of requiring
test/unit/ui/console/testrunner.

$ gem19 install ramaze --test

Thank you for installing Ramaze!
You can now do following:

  • Create a new project using the `ramaze' command:
    ramaze --create yourproject

============================================================
Successfully installed ramaze-2008.06
1 gem installed
Installing ri documentation for ramaze-2008.06...
Updating class cache with 1175 classes...
Installing RDoc documentation for ramaze-2008.06...
Gem::SourceIndex#search support for String patterns is deprecated
/home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/commands/install_command.rb:134:in
block in execute' is outdated There are no unit tests to run for ramaze-2008.06 /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/validator.rb:161:in require': no such file to load -- test/unit/ui/console/testrunner
(LoadError)
from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/validator.rb:161:in
unit_test' from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/commands/install_command.rb:135:in block in execute'
from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/commands/install_command.rb:133:in
each' from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/commands/install_command.rb:133:in execute'
from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/command.rb:136:in
invoke' from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/command_manager.rb:105:in process_args'
from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/command_manager.rb:75:in
run' from /home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/gem_runner.rb:39:in run'
from /home/mame/local/bin/gem19:24:in `'

--
Yusuke ENDOH
=end

Actions #1

Updated by zenspider (Ryan Davis) about 16 years ago

=begin

On Oct 7, 2008, at 07:43 , Yusuke ENDOH wrote:

Executing gem with --test may fail because of requiring
test/unit/ui/console/testrunner.

I'll get Eric to fix this today.

=end

Actions #2

Updated by drbrain (Eric Hodel) about 16 years ago

=begin
On Oct 7, 2008, at 07:43 AM, Yusuke ENDOH wrote:

Executing gem with --test may fail because of requiring
test/unit/ui/console/testrunner.

Is it also ok if I check in some windows RubyGems fixes at the same
time?

=end

Actions #3

Updated by mame (Yusuke Endoh) about 16 years ago

=begin
Hi,

2008/10/8 Eric Hodel :

On Oct 7, 2008, at 07:43 AM, Yusuke ENDOH wrote:

Executing gem with --test may fail because of requiring
test/unit/ui/console/testrunner.

Is it also ok if I check in some windows RubyGems fixes at the same time?

I think Yugui or Matz has a duty to reply to this :-(

By the way, the original problem which I reported disappeared currently
since test/unit was recovered. But I still doubt the behavior of gem when
`gem install' is executed with --test and the package has no unit tests.

The current behavior is:

  • require 'test/unit/ui/console/testrunner'
    (at unit_test in lib/rubygems/validator.rb)

  • check the return value of TestResult#passed?
    (at execute in lib/rubygems/commands/install_command.rb).

But test/unit executes its tests in at_exit. No tests are executed yet
when passed? is called, and the call always returns true. So I think that
the check for passed? is meaningless. Is it intended?

Here is the current result of gem install ramaze --test'. test/unit seems to receive ARGV which I passed to gem. The last exception $! is a
read-only variable' is another problem which I have already reported at
[ruby-dev:36712].

$ gem19 install ramaze --test

Thank you for installing Ramaze!
You can now do following:

  • Create a new project using the `ramaze' command:
    ramaze --create yourproject

============================================================
Successfully installed ramaze-2008.06
1 gem installed
Installing ri documentation for ramaze-2008.06...
Updating class cache with 1878 classes...
Installing RDoc documentation for ramaze-2008.06...
Gem::SourceIndex#search support for String patterns is deprecated
/home/mame/work/ruby19/local/lib/ruby/1.9.0/rubygems/commands/install_command.rb:134:in
`block in execute' is outdated
There are no unit tests to run for ramaze-2008.06
missing argument: --test
Test::Unit automatic runner.
Usage: /home/mame/local/bin/gem19 [options] [-- untouched arguments]

 -r, --runner=RUNNER              Use the given RUNNER.
                                  (c[onsole], f[ox], g[tk], g[tk]2, t[k])
 -n, --name=NAME                  Runs tests matching NAME.
                                  (patterns may be used).
 -t, --testcase=TESTCASE          Runs tests in TestCases matching TESTCASE.
                                  (patterns may be used).
 -I, --load-path=DIR[:DIR...]     Appends directory list to $LOAD_PATH.
 -v, --verbose=[LEVEL]            Set the output level (default is verbose).
                                  (s[ilent], p[rogress], n[ormal], v[erbose])
     --                           Stop processing options so that the
                                  remaining options will be passed to the
                                  test.
 -h, --help                       Display this help.

Deprecated options:
--console Console runner (use --runner).
--gtk GTK runner (use --runner).
--fox Fox runner (use --runner).

/home/mame/work/ruby19/local/lib/ruby/1.9.0/test/unit/autorunner.rb:91:in
rescue in process_args': $! is a read-only variable (NameError) from /home/mame/work/ruby19/local/lib/ruby/1.9.0/test/unit/autorunner.rb:86:in process_args'
from /home/mame/work/ruby19/local/lib/ruby/1.9.0/test/unit/autorunner.rb:11:in
run' from /home/mame/work/ruby19/local/lib/ruby/1.9.0/test/unit.rb:278:in block in <top (required)>'

--
Yusuke ENDOH

=end

Actions #4

Updated by yugui (Yuki Sonoda) about 16 years ago

=begin
Eric Hodel wrote:

Is it also ok if I check in some windows RubyGems fixes at the same time?

What are the fixes?

--
Yugui
http://yugui.jp

=end

Actions #5

Updated by mame (Yusuke Endoh) about 16 years ago

  • Priority changed from 3 to Normal

=begin

=end

Actions #6

Updated by drbrain (Eric Hodel) about 16 years ago

=begin
On Oct 13, 2008, at 06:09 AM, Yugui (Yuki Sonoda) wrote:

Eric Hodel wrote:

Is it also ok if I check in some windows RubyGems fixes at the same
time?

What are the fixes?

Most important:
RubyGems now works on windows platforms (which don't have
File::Stat#uid).

Also:
gem_prelude.rb now works with defaults.rb properly
Gem.inflate, deflate, etc. now require 'zlib' properly (on use)
A bogus PATH warning is removed for `gem unpack'

=end

Actions #7

Updated by yugui (Yuki Sonoda) about 16 years ago

=begin
Eric Hodel wrote:

What are the fixes?

Most important:
RubyGems now works on windows platforms (which don't have File::Stat#uid).

Also:
gem_prelude.rb now works with defaults.rb properly
Gem.inflate, deflate, etc. now require 'zlib' properly (on use)
A bogus PATH warning is removed for `gem unpack'

OK. commit them.

--
Yugui
http://yugui.jp

=end

Actions #8

Updated by ko1 (Koichi Sasada) about 16 years ago

  • Assignee set to drbrain (Eric Hodel)

=begin

=end

Actions #9

Updated by yugui (Yuki Sonoda) about 16 years ago

  • Category set to lib
  • Priority changed from Normal to 5
  • Target version set to 1.9.1 Release Candidate

=begin
Does this issue still reproduce?
=end

Actions #10

Updated by drbrain (Eric Hodel) about 16 years ago

  • Status changed from Open to Closed

=begin
gem19 install --test appears to work now:

$ gem19 install ZenTest --test
[...]
Successfully installed ZenTest-3.11.0
1 gem installed
Installing ri documentation for ZenTest-3.11.0...
Installing RDoc documentation for ZenTest-3.11.0...
[...]
Loaded suite /usr/local/bin/gem19
Started
...................................................................................
Finished in 0.166171 seconds.

83 tests, 212 assertions, 0 failures, 0 errors, 0 skips
/Users/drbrain/.gem/ruby/1.9.1/gems/ZenTest-3.11.0/test/test_zentest.rb: /Users/drbrain/.gem/ruby/1.9.1/gems/ZenTest-3.11.0/test/test_zentest.rb:5: Invalid return (SyntaxError)
$
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0