From 3aa45744ab0d100934dcefcc90fdf157f259c7f4 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 24 Jun 2007 06:52:59 +0000 Subject: * 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 --- bootstraptest/runner.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'bootstraptest/runner.rb') 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 } -- cgit v1.2.3