summaryrefslogtreecommitdiff
path: root/bootstraptest/runner.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-06 05:50:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-06 05:50:42 +0000
commit7990a473eb5e50304a276d4fce920d0da1f994d9 (patch)
tree14ce74408af49ed9af0494024bff3f3c2073c283 /bootstraptest/runner.rb
parentc512a69a2df121215d20edf4e8b646c929d62987 (diff)
* bootstraptest/runner.rb: added --quiet option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/runner.rb')
-rw-r--r--bootstraptest/runner.rb18
1 files changed, 13 insertions, 5 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 280276d..556a1d9 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