From 7990a473eb5e50304a276d4fce920d0da1f994d9 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 6 Jul 2007 05:50:42 +0000 Subject: * bootstraptest/runner.rb: added --quiet option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/runner.rb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'bootstraptest/runner.rb') diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb index 280276d222..556a1d9e12 100644 --- a/bootstraptest/runner.rb +++ b/bootstraptest/runner.rb @@ -11,6 +11,7 @@ def main @ruby = File.expand_path('miniruby') @verbose = false dir = '/tmp/bootstraptest.tmpwd' + quiet = false tests = nil ARGV.delete_if {|arg| case arg @@ -24,6 +25,9 @@ def main when /\A--dir=(.*)/ dir = $1 true + when /\A(-q|--q(uiet))\z/ + quiet = true + true when /\A(-v|--v(erbose))\z/ @verbose = true when /\A(-h|--h(elp)?)\z/ @@ -33,6 +37,7 @@ Usage: #{File.basename($0, '.*')} --ruby=PATH [--sets=NAME,NAME,...] --dir=DIRECTORY Working directory. default: /tmp/bootstraptest.tmpwd -v, --verbose Output test name before exec. + -q, --quiet Don\'t print header message. -h, --help Print this message and quit. End exit 0 @@ -48,11 +53,14 @@ End 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 + unless quiet + 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 + $stdout.flush + end in_temporary_working_directory(dir) { exec_test pathes -- cgit v1.2.3