summaryrefslogtreecommitdiff
path: root/bootstraptest/runner.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 06:52:59 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-24 06:52:59 +0000
commit3aa45744ab0d100934dcefcc90fdf157f259c7f4 (patch)
tree38b1bbb4de8059c81e0dcfb441be44cfe07243ef /bootstraptest/runner.rb
parent1fb587ddec95d23675a2ff919d5f4f11339ae247 (diff)
* bootstraptest/runner.rb: set default directory to
'/tmp/bootstraptest.tmpwd' and add --dir option. fix to output driver and target information. * common.mk: fix to run btest on BASERUBY and add OPTS to pass option ("make btest OPTS=..."). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/runner.rb')
-rw-r--r--bootstraptest/runner.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index ed2880903c..2858aa9ac3 100644
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -11,7 +11,7 @@ require 'fileutils'
def main
@ruby = File.expand_path('miniruby')
@verbose = false
- dir = 'bootstraptest.tmpwd'
+ dir = '/tmp/bootstraptest.tmpwd'
tests = nil
ARGV.delete_if {|arg|
case arg
@@ -22,12 +22,17 @@ def main
tests = Dir.glob("#{File.dirname($0)}/test_{#{$1}}*.rb")
puts tests.map {|path| File.basename(path) }.inspect
true
+ when /\A--dir=(.*)/
+ dir = $1
+ true
when /\A(-v|--v(erbose))\z/
@verbose = true
when /\A(-h|--h(elp)?)\z/
puts(<<-End)
Usage: #{File.basename($0, '.*')} --ruby=PATH [--sets=NAME,NAME,...]
--sets=NAME,NAME,... Name of test sets.
+ --dir=DIRECTORY Working directory.
+ default: /tmp/bootstraptest.tmpwd
-v, --verbose Output test name before exec.
-h, --help Print this message and quit.
End
@@ -43,6 +48,13 @@ End
tests ||= ARGV
tests = Dir.glob("#{File.dirname($0)}/test_*.rb") if tests.empty?
pathes = tests.map {|path| File.expand_path(path) }
+
+ puts Time.now
+ patchlevel = defined?(RUBY_PATCHLEVEL) ? " pachlevel #{RUBY_PATCHLEVEL}" : ''
+ puts "Driver is ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}#{patchlevel}) [#{RUBY_PLATFORM}]"
+ puts "Target is #{`#{@ruby} -v`}"
+ puts
+
in_temporary_working_directory(dir) {
exec_test pathes
}