mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bootstraptest/runner.rb (main): leave -I options for purelib.rb
untouched. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b7a1480540
commit
589a164abc
2 changed files with 10 additions and 7 deletions
|
@ -1,4 +1,7 @@
|
||||||
Sun May 11 22:39:33 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun May 11 22:54:02 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* bootstraptest/runner.rb (main): leave -I options for purelib.rb
|
||||||
|
untouched.
|
||||||
|
|
||||||
* bootstraptest/runner.rb (main): handle relative path -r options.
|
* bootstraptest/runner.rb (main): handle relative path -r options.
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ def main
|
||||||
when /\A--ruby=(.*)/
|
when /\A--ruby=(.*)/
|
||||||
@ruby = $1
|
@ruby = $1
|
||||||
@ruby.gsub!(/^([^ ]*)/){File.expand_path($1)}
|
@ruby.gsub!(/^([^ ]*)/){File.expand_path($1)}
|
||||||
@ruby.gsub!(/(\s+-I\s*)(\S+)/){$1+File.expand_path($2)}
|
@ruby.gsub!(/(\s+-I\s*)((?!(?:\.\/)*-(?:\s|\z))\S+)/){$1+File.expand_path($2)}
|
||||||
@ruby.gsub!(/(\s+-r\s*)(\.\.?\/\S+)/){$1+File.expand_path($2)}
|
@ruby.gsub!(/(\s+-r\s*)(\.\.?\/\S+)/){$1+File.expand_path($2)}
|
||||||
true
|
true
|
||||||
when /\A--sets=(.*)/
|
when /\A--sets=(.*)/
|
||||||
|
@ -80,14 +80,14 @@ Usage: #{File.basename($0, '.*')} --ruby=PATH [--sets=NAME,NAME,...]
|
||||||
-q, --quiet Don\'t print header message.
|
-q, --quiet Don\'t print header message.
|
||||||
-h, --help Print this message and quit.
|
-h, --help Print this message and quit.
|
||||||
End
|
End
|
||||||
exit 0
|
exit true
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
if tests and not ARGV.empty?
|
if tests and not ARGV.empty?
|
||||||
$stderr.puts "--tests and arguments are exclusive"
|
$stderr.puts "--tests and arguments are exclusive"
|
||||||
exit 1
|
exit false
|
||||||
end
|
end
|
||||||
tests ||= ARGV
|
tests ||= ARGV
|
||||||
tests = Dir.glob("#{File.dirname($0)}/test_*.rb") if tests.empty?
|
tests = Dir.glob("#{File.dirname($0)}/test_*.rb") if tests.empty?
|
||||||
|
@ -97,7 +97,7 @@ End
|
||||||
puts Time.now
|
puts Time.now
|
||||||
patchlevel = defined?(RUBY_PATCHLEVEL) ? " patchlevel #{RUBY_PATCHLEVEL}" : ''
|
patchlevel = defined?(RUBY_PATCHLEVEL) ? " patchlevel #{RUBY_PATCHLEVEL}" : ''
|
||||||
puts "Driver is ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}#{patchlevel}) [#{RUBY_PLATFORM}]"
|
puts "Driver is ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}#{patchlevel}) [#{RUBY_PLATFORM}]"
|
||||||
puts "Target is #{`#{@ruby} -v`}"
|
puts "Target is #{`#{@ruby} -v`.chomp}"
|
||||||
puts
|
puts
|
||||||
$stdout.flush
|
$stdout.flush
|
||||||
end
|
end
|
||||||
|
@ -119,13 +119,13 @@ def exec_test(pathes)
|
||||||
$stderr.puts
|
$stderr.puts
|
||||||
if @error == 0
|
if @error == 0
|
||||||
$stderr.puts "PASS #{@count} tests"
|
$stderr.puts "PASS #{@count} tests"
|
||||||
exit 0
|
exit true
|
||||||
else
|
else
|
||||||
@errbuf.each do |msg|
|
@errbuf.each do |msg|
|
||||||
$stderr.puts msg
|
$stderr.puts msg
|
||||||
end
|
end
|
||||||
$stderr.puts "FAIL #{@error}/#{@count} tests failed"
|
$stderr.puts "FAIL #{@error}/#{@count} tests failed"
|
||||||
exit 1
|
exit false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue