summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-30 01:24:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-30 01:24:05 +0000
commita8f87d6d8d04d34ead8915ae350999c7875180ea (patch)
tree586cc013033faa5251906036ca79ab8db03c1b21
parent99c741c119e46ae4f12f68095ca6f9f1d6d2b58d (diff)
common test options
* common.mk (btest, test-sample, test-knownbugs, test-all, test-ruby): pass common options by TESTOPTS. * tool/rubytest.rb: pass ARGV from make to sample/test.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--common.mk14
-rwxr-xr-xtool/rubytest.rb2
2 files changed, 8 insertions, 8 deletions
diff --git a/common.mk b/common.mk
index 37edb232de3..0f1842498fa 100644
--- a/common.mk
+++ b/common.mk
@@ -474,37 +474,37 @@ check-ruby: test test-ruby
btest: $(TEST_RUNNABLE)-btest
no-btest: PHONY
yes-btest: miniruby$(EXEEXT) PHONY
- $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY)" $(OPTS)
+ $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY)" $(OPTS) $(TESTOPTS)
btest-ruby: $(TEST_RUNNABLE)-btest-ruby
no-btest-ruby: PHONY
yes-btest-ruby: prog PHONY
- $(Q)$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib" -q $(OPTS)
+ $(Q)$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib" -q $(OPTS) $(TESTOPTS)
test-sample: $(TEST_RUNNABLE)-test-sample
no-test-sample: PHONY
yes-test-sample: prog PHONY
- $(Q)$(RUNRUBY) $(srcdir)/tool/rubytest.rb
+ $(Q)$(RUNRUBY) $(srcdir)/tool/rubytest.rb $(OPTS) $(TESTOPTS)
test-knownbugs: test-knownbug
test-knownbug: $(TEST_RUNNABLE)-test-knownbug
no-test-knownbug: PHONY
yes-test-knownbug: prog PHONY
- -$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM)" $(OPTS) $(srcdir)/KNOWNBUGS.rb
+ -$(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM)" $(OPTS) $(TESTOPTS) $(srcdir)/KNOWNBUGS.rb
test: test-sample btest-ruby test-knownbug
test-all: $(TEST_RUNNABLE)-test-all
yes-test-all: prog PHONY
- $(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TESTS)
+ $(RUNRUBY) "$(srcdir)/test/runner.rb" --ruby="$(RUNRUBY)" $(TESTOPTS) $(TESTS)
TESTS_BUILD = mkmf
no-test-all: PHONY
- $(MINIRUBY) -I"$(srcdir)/lib" "$(srcdir)/test/runner.rb" $(TESTS_BUILD)
+ $(MINIRUBY) -I"$(srcdir)/lib" "$(srcdir)/test/runner.rb" $(TESTOPTS) $(TESTS_BUILD)
test-ruby: $(TEST_RUNNABLE)-test-ruby
no-test-ruby: PHONY
yes-test-ruby: prog encs PHONY
- $(RUNRUBY) "$(srcdir)/test/runner.rb" -q $(TESTS) ruby
+ $(RUNRUBY) "$(srcdir)/test/runner.rb" -q $(TESTOPTS) $(TESTS) ruby
extconf: $(PREP)
$(Q) $(MAKEDIRS) "$(EXTCONFDIR)"
diff --git a/tool/rubytest.rb b/tool/rubytest.rb
index 6b8a665dde5..08eada44b8b 100755
--- a/tool/rubytest.rb
+++ b/tool/rubytest.rb
@@ -16,7 +16,7 @@ $stderr.reopen($stdout)
error = ''
srcdir = File.expand_path('..', File.dirname(__FILE__))
-`#{ruby} #{srcdir}/sample/test.rb`.each_line do |line|
+`#{ruby} #{srcdir}/sample/test.rb #{ARGV.join(' ')}`.each_line do |line|
if line =~ /^end of test/
print "\ntest succeeded\n"
exit true