Project

General

Profile

Bug #7717

lib/rubygems/test_case.rb fails to setup

Added by nobu (Nobuyoshi Nakada) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
r38887
Backport:
[ruby-core:51531]

Description

=begin
If (({tmp/test})) is not a directory, (({tmp})) is not writable, or (({tmp})) is not a directory, (({lib/rubygems/test_case.rb})) fails to (({setup})).

[ 1/1196] TestRDocRubygemsHook#test_generate_configuration_rdoc_string = 0.00 s
1) Error:
test_generate_configuration_rdoc_string(TestRDocRubygemsHook):
Errno::ENOTDIR: Not a directory - /Users/nobu/build/ruby/trunk/universal-darwin/tmp/test/test_rubygems_35281
/Users/nobu/src/ruby/trunk/src/lib/rubygems/test_case.rb:143:in chdir'
/Users/nobu/src/ruby/trunk/src/lib/rubygems/test_case.rb:143:in
setup'
/Users/nobu/src/ruby/trunk/src/test/rdoc/test_rdoc_rubygems_hook.rb:8:in `setup'

(snip)

[1196/1196] TestGemSpecification#test_hash = 0.00 s
1260) Error:
test_hash(TestGemSpecification):
Errno::ENOTDIR: Not a directory - /Users/nobu/build/ruby/trunk/universal-darwin/tmp/test/test_rubygems_35281
/Users/nobu/src/ruby/trunk/src/lib/rubygems/test_case.rb:143:in chdir'
/Users/nobu/src/ruby/trunk/src/lib/rubygems/test_case.rb:143:in
setup'
/Users/nobu/src/ruby/trunk/src/test/rubygems/test_gem_specification.rb:42:in `setup'
=end


Files

0001-test_case.rb-use-tmpdir.patch (1.51 KB) 0001-test_case.rb-use-tmpdir.patch nobu (Nobuyoshi Nakada), 01/20/2013 11:14 PM

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Description updated (diff)
#2

Updated by drbrain (Eric Hodel) over 7 years ago

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

This issue was solved with changeset r38897.
Nobuyoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/rubygems/test_case.rb: Use Dir.tmpdir for rubygems tests instead of ./tmp/test. Fixes [ruby-trunk - Bug #7717]

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

=begin
# This makes the tempdir consistent on OS X.
# File.expand_path Dir.tmpdir #=> "/var/..."
# Dir.chdir Dir.tmpdir do File.expand_path '.' end #=> "/private/var/..."

(({File.realpath})) may be your friend.
=end

Updated by drbrain (Eric Hodel) over 7 years ago

Once I drop 1.8.7 support in RubyGems I can use File.realpath. I added a note to remind myself.

Also available in: Atom PDF