diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-15 10:57:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-04-15 10:57:16 +0000 |
commit | a3dc7b771e08f43c149687c0e70dd4bbdaa71329 (patch) | |
tree | 09ec0b85c96a149e181545b8942c918a9f975bc4 /rubytest.rb | |
parent | b3db09df79386f602b513e064f4e886f5ac6672d (diff) | |
download | ruby-a3dc7b771e08f43c149687c0e70dd4bbdaa71329.tar.gz |
* rubytest.rb: do nothing while cross-compiling, return status in
system independent style.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rubytest.rb')
-rw-r--r-- | rubytest.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/rubytest.rb b/rubytest.rb index d664bcf3ae..18d5ca89ba 100644 --- a/rubytest.rb +++ b/rubytest.rb @@ -1,12 +1,14 @@ #! ./miniruby +exit if defined?(CROSS_COMPILING) load './rbconfig.rb' include Config -unless File.exist? "./#{CONFIG['ruby_install_name']}#{CONFIG['EXEEXT']}" - print "./#{CONFIG['ruby_install_name']} is not found.\n" +ruby = "./#{CONFIG['ruby_install_name']}#{CONFIG['EXEEXT']}" +unless File.exist? ruby + print "#{ruby} is not found.\n" print "Try `make' first, then `make test', please.\n" - exit 1 + exit false end if File.exist? CONFIG['LIBRUBY_SO'] @@ -35,13 +37,13 @@ $stderr.reopen($stdout) error = '' srcdir = File.dirname(__FILE__) -`./#{CONFIG["ruby_install_name"]}#{CONFIG["EXEEXT"]} -I#{srcdir}/lib #{srcdir}/sample/test.rb`.each do |line| +`#{ruby} -I#{srcdir}/lib #{srcdir}/sample/test.rb`.each do |line| if line =~ /^end of test/ print "test succeeded\n" - exit 0 + exit true end error << line if line =~ %r:^(sample/test.rb|not): end print error print "test failed\n" -exit 1 +exit false |