Permalink
Browse files

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
  • Loading branch information...
1 parent 99c741c commit a8f87d6d8d04d34ead8915ae350999c7875180ea @nobu nobu committed May 30, 2012
Showing with 8 additions and 8 deletions.
  1. +7 −7 common.mk
  2. +1 −1 tool/rubytest.rb
View
@@ -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)"
View
@@ -16,7 +16,7 @@
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

0 comments on commit a8f87d6

Please sign in to comment.