diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-13 05:45:20 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-08-13 05:45:20 +0000 |
commit | 07bb9f21f56b0d066c44c62b0e6be35eb0e0fd51 (patch) | |
tree | 082bb7d5568f3b2e36e3fe166e9f3039394fcf44 /rubytest.rb | |
parent | f746453a4ae16f643b2ae8c0d6ec77a2e63b4eb1 (diff) | |
download | ruby-07bb9f21f56b0d066c44c62b0e6be35eb0e0fd51.tar.gz ruby-07bb9f21f56b0d066c44c62b0e6be35eb0e0fd51.tar.xz ruby-07bb9f21f56b0d066c44c62b0e6be35eb0e0fd51.zip |
1.4.0
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rubytest.rb')
-rw-r--r-- | rubytest.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/rubytest.rb b/rubytest.rb index cf583c1df..61b31ceaf 100644 --- a/rubytest.rb +++ b/rubytest.rb @@ -3,9 +3,27 @@ require 'rbconfig' include Config +if File.exist? CONFIG['LIBRUBY_SO'] + case RUBY_PLATFORM + when /-hpux/ + dldpath = "SHLIB_PATH" + when /-aix/ + dldpath = "LIBPATH" + else + dldpath = "LD_LIBRARY_PATH" + end + x = ENV[dldpath] + x = x ? ".:"+x : "." + ENV[dldpath] = x +end + +if /linux/ =~ RUBY_PLATFORM and File.exist? CONFIG['LIBRUBY_SO'] + ENV["LD_PRELOAD"] = "./#{CONFIG['LIBRUBY_SO']}" +end + $stderr.reopen($stdout) error = '' -`./ruby #{CONFIG["srcdir"]}/sample/test.rb`.each do |line| +`./#{CONFIG["ruby_install_name"]} #{CONFIG["srcdir"]}/sample/test.rb`.each do |line| if line =~ /^end of test/ print "test succeeded\n" exit 0 |