From 65a5162550f58047974793cdc8067a970b2435c0 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 13 Aug 1999 05:45:20 +0000 Subject: 1.4.0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- rubytest.rb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'rubytest.rb') diff --git a/rubytest.rb b/rubytest.rb index cf583c1dfb..61b31ceaf1 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 -- cgit v1.2.1