1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2012-05-30 01:24:05 +00:00
parent 99c741c119
commit a8f87d6d8d
2 changed files with 8 additions and 8 deletions

View file

@ -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 file

@ -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