* 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
This commit is contained in:
parent
b3db09df79
commit
a3dc7b771e
@ -1,8 +1,11 @@
|
|||||||
Thu Apr 15 19:53:08 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Apr 15 19:57:11 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* process.c (pst_success_p): new method Process::Status#success?.
|
* process.c (pst_success_p): new method Process::Status#success?.
|
||||||
[ruby-dev:23385]
|
[ruby-dev:23385]
|
||||||
|
|
||||||
|
* rubytest.rb: do nothing while cross-compiling, return status in
|
||||||
|
system independent style.
|
||||||
|
|
||||||
Thu Apr 15 19:26:54 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
Thu Apr 15 19:26:54 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
|
||||||
|
|
||||||
* dir.c (rb_push_glob): Dir.glob() should return nil if block is given.
|
* dir.c (rb_push_glob): Dir.glob() should return nil if block is given.
|
||||||
|
14
rubytest.rb
14
rubytest.rb
@ -1,12 +1,14 @@
|
|||||||
#! ./miniruby
|
#! ./miniruby
|
||||||
|
|
||||||
|
exit if defined?(CROSS_COMPILING)
|
||||||
load './rbconfig.rb'
|
load './rbconfig.rb'
|
||||||
include Config
|
include Config
|
||||||
|
|
||||||
unless File.exist? "./#{CONFIG['ruby_install_name']}#{CONFIG['EXEEXT']}"
|
ruby = "./#{CONFIG['ruby_install_name']}#{CONFIG['EXEEXT']}"
|
||||||
print "./#{CONFIG['ruby_install_name']} is not found.\n"
|
unless File.exist? ruby
|
||||||
|
print "#{ruby} is not found.\n"
|
||||||
print "Try `make' first, then `make test', please.\n"
|
print "Try `make' first, then `make test', please.\n"
|
||||||
exit 1
|
exit false
|
||||||
end
|
end
|
||||||
|
|
||||||
if File.exist? CONFIG['LIBRUBY_SO']
|
if File.exist? CONFIG['LIBRUBY_SO']
|
||||||
@ -35,13 +37,13 @@ $stderr.reopen($stdout)
|
|||||||
error = ''
|
error = ''
|
||||||
|
|
||||||
srcdir = File.dirname(__FILE__)
|
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/
|
if line =~ /^end of test/
|
||||||
print "test succeeded\n"
|
print "test succeeded\n"
|
||||||
exit 0
|
exit true
|
||||||
end
|
end
|
||||||
error << line if line =~ %r:^(sample/test.rb|not):
|
error << line if line =~ %r:^(sample/test.rb|not):
|
||||||
end
|
end
|
||||||
print error
|
print error
|
||||||
print "test failed\n"
|
print "test failed\n"
|
||||||
exit 1
|
exit false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user