Project

General

Profile

Bug #1714

make test-all failed

Added by znz (Kazuhiro NISHIYAMA) almost 10 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.8.8dev (2009-07-01 revision 23923) [i686-linux]
[ruby-core:24115]

Description

=begin
make test-all failed in lib/test/unit/collector/dir.rb.

./miniruby -I/home/kazu/wc/ruby/branches/ruby_1_8/lib -I.ext/common -I./- -r/home/kazu/wc/ruby/branches/ruby_1_8/ext/purelib.rb /home/kazu/wc/ruby/branches/ruby_1_8/runruby.rb --extout=.ext -- "/home/kazu/wc/ruby/branches/ruby_1_8/test/runner.rb" --basedir="/home/kazu/wc/ruby/branches/ruby_1_8/test" --runner=console -v
/home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/ssl.rb:13: uninitialized constant WEBrick::Config::General (NameError)
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/https.rb:11:in require'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/https.rb:11
from /home/kazu/wc/ruby/branches/ruby_1_8/test/webrick/utils.rb:10:in
require'
from /home/kazu/wc/ruby/branches/ruby_1_8/test/webrick/utils.rb:10
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/config.rb:14:in require'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick/config.rb:14
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick.rb:14:in
require'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/webrick.rb:14
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/httpserver.rb:12:in require'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/httpserver.rb:12
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/standaloneServer.rb:9:in
require'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/soap/rpc/standaloneServer.rb:9
from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/RAAService.rb:4:in require'
from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/RAAService.rb:4
from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/test_raa.rb:5:in
require'
from /home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa/test_raa.rb:5
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:90:in require'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:90:in
collect_file'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:73:in recursive_collect'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in
each'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in recursive_collect'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:63:in
recursive_collect'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in each'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in
recursive_collect'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:63:in recursive_collect'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in
each'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:58:in recursive_collect'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/collector/dir.rb:29:in
collect'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/autorunner.rb:68
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/autorunner.rb:213:in []'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/autorunner.rb:213:in
run'
from /home/kazu/wc/ruby/branches/ruby_1_8/lib/test/unit/autorunner.rb:12:in `run'
from /home/kazu/wc/ruby/branches/ruby_1_8/test/runner.rb:7
make: *** [test-all] エラー 1

I put "p $LOAD_PATH" into lib/webrick/ssl.rb, and it outputs:
["/home/kazu/wc/ruby/branches/ruby_1_8/test/wsdl/raa", "/home/kazu/wc/ruby/branches/ruby_1_8/test", "/home/kazu/wc/ruby/branches/ruby_1_8/test/ruby", "/home/kazu/build/ruby/ruby_1_8/ruby", "/home/kazu/build/ruby/ruby_1_8/ruby/.ext/common", "/home/kazu/build/ruby/ruby_1_8/ruby/.ext/i686-linux", "/home/kazu/wc/ruby/branches/ruby_1_8/lib", "/home/kazu/wc/ruby/branches/ruby_1_8/ext", "."]

It looks require 'webrick/utils' loads test/webrick/utils.rb instead of lib/webrick/utils.rb, because $LOAD_PATH includes test directory.
=end

History

#1

Updated by znz (Kazuhiro NISHIYAMA) almost 10 years ago

=begin
This can reproduce: make test-all TESTS="-v test_timeout wsdl/raa/test_raa"

Bug is $:.rindex(dir) in test/unit/collector/dir.rb.

test/unit/collector/dir.rb:
def collect_file(name, suites, already_gathered)
dir = @file.dirname(@file.expand_path(name, @base))
$:.unshift(dir)
if(@req)
@req.require(name)
else
require(name)
end
find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
ensure
$:.delete_at($:.rindex(dir)) if(dir)
end

At first, "/home/kazu/wc/ruby/branches/ruby_1_8/test" ($srcdir/test) is included at $:.last.
After collect_file with name includes filename only, $srcdir/test is included at $:.first and deleted from $:.last.
Because $:.rindex(dir) returns index of $:.last instead of $:.first.

=end

#2

Updated by Anonymous almost 10 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r24668.
=end

Also available in: Atom PDF