test: realpath
* test/runner.rb (src_testdir): expand real path so that TestGem#test_self_find_files does not fail by aliased load path when srcdir contains a symbolic link. * tool/runruby.rb (srcdir): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
52c7036436
commit
2696fb9503
@ -1,3 +1,11 @@
|
|||||||
|
Fri Jun 8 16:19:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/runner.rb (src_testdir): expand real path so that
|
||||||
|
TestGem#test_self_find_files does not fail by aliased load path when
|
||||||
|
srcdir contains a symbolic link.
|
||||||
|
|
||||||
|
* tool/runruby.rb (srcdir): ditto.
|
||||||
|
|
||||||
Fri Jun 8 12:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Fri Jun 8 12:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* process.c (rb_fork_err): error state in the child process is prior
|
* process.c (rb_fork_err): error state in the child process is prior
|
||||||
|
@ -2,7 +2,7 @@ require 'rbconfig'
|
|||||||
|
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
|
|
||||||
src_testdir = File.dirname(File.expand_path(__FILE__))
|
src_testdir = File.dirname(File.realpath(__FILE__))
|
||||||
$LOAD_PATH << src_testdir
|
$LOAD_PATH << src_testdir
|
||||||
module Gem
|
module Gem
|
||||||
end
|
end
|
||||||
|
@ -32,7 +32,16 @@ while arg = ARGV[0]
|
|||||||
ARGV.shift
|
ARGV.shift
|
||||||
end
|
end
|
||||||
|
|
||||||
srcdir ||= File.expand_path('..', File.dirname(__FILE__))
|
unless defined?(File.realpath)
|
||||||
|
def File.realpath(*args)
|
||||||
|
Dir.chdir do
|
||||||
|
expand_path(*args)
|
||||||
|
Dir.pwd
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
srcdir ||= File.realpath('..', File.dirname(__FILE__))
|
||||||
archdir ||= '.'
|
archdir ||= '.'
|
||||||
|
|
||||||
abs_archdir = File.expand_path(archdir)
|
abs_archdir = File.expand_path(archdir)
|
||||||
@ -50,7 +59,7 @@ end
|
|||||||
libs = [abs_archdir]
|
libs = [abs_archdir]
|
||||||
extout ||= config["EXTOUT"]
|
extout ||= config["EXTOUT"]
|
||||||
if extout
|
if extout
|
||||||
abs_extout = File.expand_path(extout)
|
abs_extout = File.expand_path(extout, abs_archdir)
|
||||||
libs << File.expand_path("common", abs_extout) << File.expand_path(config['arch'], abs_extout)
|
libs << File.expand_path("common", abs_extout) << File.expand_path(config['arch'], abs_extout)
|
||||||
end
|
end
|
||||||
libs << File.expand_path("lib", srcdir)
|
libs << File.expand_path("lib", srcdir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user