aboutsummaryrefslogtreecommitdiffstats
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
parent1fb587ddec95d23675a2ff919d5f4f11339ae247 (diff)
downloadruby-3aa45744ab0d100934dcefcc90fdf157f259c7f4.tar.gz
* 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
-rw-r--r--ChangeLog9
-rw-r--r--bootstraptest/runner.rb14
-rw-r--r--common.mk4
3 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 68b7860819..4f49d0356b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sun Jun 24 15:33:47 2007 Koichi Sasada <ko1@atdot.net>
+
+ * 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=...").
+
Sun Jun 24 03:05:00 2007 Tanaka Akira <akr@fsij.org>
* enum.c (enum_minmax): fix SEGV by [].minmax.
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
}
diff --git a/common.mk b/common.mk
index 133d0c0611..1ad8999874 100644
--- a/common.mk
+++ b/common.mk
@@ -92,7 +92,7 @@ PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.unlink(ARGV[0]) rescue nil'
TESTSDIR = $(srcdir)/test
TESTWORKDIR = testwork
-BOOTSTRAPRUBY = $(MINIRUBY)
+BOOTSTRAPRUBY = $(BASERUBY)
all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
@$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
@@ -315,7 +315,7 @@ realclean-ext::
check: test test-all
btest: $(MINIRUBY) PHONY
- @$(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(MINIRUBY)"
+ $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(MINIRUBY)" $(OPTS)
test: miniruby$(EXEEXT) $(RBCONFIG) $(PROGRAM) PHONY
@$(MINIRUBY) $(srcdir)/rubytest.rb