mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 54086,54211,54233: [Backport #12199]
* test/lib/test/unit.rb (Options#non_options): make regexp name options prefixed with "!" negative filters. * common.mk (TEST_EXCLUDES): use negative filter to exclude memory leak tests. -x option excludes test files, not test methods. * common.mk (TEST_EXCLUDES, EXCLUDE_TESTFRAMEWORK): use full spell long option. * cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL): suppress path name conversions by msys2. [ruby-dev:49525] [Bug #12199] * cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL_PARAM): * add missing parentheses and remove double quotes. * rename to get rid of recursive references. * as --excludes-dir option is for a path name, its argument should be converted. [ruby-dev:49526] [Bug #12199] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b118f5d82f
commit
ffcad81c19
5 changed files with 63 additions and 9 deletions
25
ChangeLog
25
ChangeLog
|
@ -1,3 +1,28 @@
|
||||||
|
Mon Apr 18 13:48:05 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL_PARAM):
|
||||||
|
* add missing parentheses and remove double quotes.
|
||||||
|
* rename to get rid of recursive references.
|
||||||
|
* as --excludes-dir option is for a path name, its argument
|
||||||
|
should be converted.
|
||||||
|
[ruby-dev:49526] [Bug #12199]
|
||||||
|
|
||||||
|
Mon Apr 18 13:48:05 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* common.mk (TEST_EXCLUDES, EXCLUDE_TESTFRAMEWORK): use full spell
|
||||||
|
long option.
|
||||||
|
|
||||||
|
* cygwin/GNUmakefile.in (MSYS2_ARG_CONV_EXCL): suppress path name
|
||||||
|
conversions by msys2. [ruby-dev:49525] [Bug #12199]
|
||||||
|
|
||||||
|
Mon Apr 18 13:48:05 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* test/lib/test/unit.rb (Options#non_options): make regexp name
|
||||||
|
options prefixed with "!" negative filters.
|
||||||
|
|
||||||
|
* common.mk (TEST_EXCLUDES): use negative filter to exclude memory
|
||||||
|
leak tests. -x option excludes test files, not test methods.
|
||||||
|
|
||||||
Sun Apr 17 04:30:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Apr 17 04:30:13 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* parse.y (parse_ident): allow keyword arguments just after a
|
* parse.y (parse_ident): allow keyword arguments just after a
|
||||||
|
|
|
@ -153,8 +153,8 @@ PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.unlink(ARGV[0]) rescue nil'
|
||||||
$(LIBRUBY_EXTS) $(LIBRUBY_SO_UPDATE)
|
$(LIBRUBY_EXTS) $(LIBRUBY_SO_UPDATE)
|
||||||
|
|
||||||
TESTSDIR = $(srcdir)/test
|
TESTSDIR = $(srcdir)/test
|
||||||
TEST_EXCLUDES = --excludes=$(TESTSDIR)/excludes -x /memory_leak/
|
TEST_EXCLUDES = --excludes-dir=$(TESTSDIR)/excludes --name=!/memory_leak/
|
||||||
EXCLUDE_TESTFRAMEWORK = -x /testunit/ -x /minitest/
|
EXCLUDE_TESTFRAMEWORK = --exclude=/testunit/ --exclude=/minitest/
|
||||||
TESTWORKDIR = testwork
|
TESTWORKDIR = testwork
|
||||||
TESTOPTS = $(RUBY_TESTOPTS)
|
TESTOPTS = $(RUBY_TESTOPTS)
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,13 @@ $(OBJS) $(MAINOBJ): win32.h
|
||||||
|
|
||||||
dir.$(OBJEXT) win32/win32.$(OBJEXT): win32/dir.h
|
dir.$(OBJEXT) win32/win32.$(OBJEXT): win32/dir.h
|
||||||
file.$(OBJEXT) win32/win32.$(OBJEXT): win32/file.h
|
file.$(OBJEXT) win32/win32.$(OBJEXT): win32/file.h
|
||||||
|
|
||||||
|
MSYS2_ARG_CONV_EXCL_PARAM = --exclude=;--name=
|
||||||
|
|
||||||
|
yes-test-ruby: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
|
||||||
|
yes-test-all: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
|
||||||
|
yes-test-almost: export MSYS2_ARG_CONV_EXCL=$(MSYS2_ARG_CONV_EXCL_PARAM)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(LIBRUBY_SO): $(RUBYDEF)
|
$(LIBRUBY_SO): $(RUBYDEF)
|
||||||
|
|
|
@ -87,7 +87,7 @@ module Test
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on '-n', '--name PATTERN', "Filter test method names on pattern: /REGEXP/ or STRING" do |a|
|
opts.on '-n', '--name PATTERN', "Filter test method names on pattern: /REGEXP/ or STRING" do |a|
|
||||||
options[:filter] = a
|
(options[:filter] ||= []) << a
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on '--test-order=random|alpha|sorted', [:random, :alpha, :sorted] do |a|
|
opts.on '--test-order=random|alpha|sorted', [:random, :alpha, :sorted] do |a|
|
||||||
|
@ -96,6 +96,30 @@ module Test
|
||||||
end
|
end
|
||||||
|
|
||||||
def non_options(files, options)
|
def non_options(files, options)
|
||||||
|
filter = options[:filter]
|
||||||
|
if filter
|
||||||
|
pos_pat = /\A\/(.*)\/\z/
|
||||||
|
neg_pat = /\A!\/(.*)\/\z/
|
||||||
|
negative, positive = filter.partition {|s| neg_pat =~ s}
|
||||||
|
if positive.empty?
|
||||||
|
filter = nil
|
||||||
|
elsif negative.empty? and positive.size == 1 and pos_pat !~ positive[0]
|
||||||
|
filter = positive[0]
|
||||||
|
else
|
||||||
|
filter = Regexp.union(*positive.map! {|s| s[pos_pat, 1] || "\\A#{Regexp.quote(s)}\\z"})
|
||||||
|
end
|
||||||
|
unless negative.empty?
|
||||||
|
negative = Regexp.union(*negative.map! {|s| s[neg_pat, 1]})
|
||||||
|
filter = /\A(?!.*#{negative})#{filter}/
|
||||||
|
end
|
||||||
|
if Regexp === filter
|
||||||
|
# bypass conversion in minitest
|
||||||
|
def filter.=~(other) # :nodoc:
|
||||||
|
super unless Regexp === other
|
||||||
|
end
|
||||||
|
end
|
||||||
|
options[:filter] = filter
|
||||||
|
end
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -589,9 +613,7 @@ module Test
|
||||||
@verbose = !options[:parallel]
|
@verbose = !options[:parallel]
|
||||||
@output = Output.new(self)
|
@output = Output.new(self)
|
||||||
end
|
end
|
||||||
if /\A\/(.*)\/\z/ =~ (filter = options[:filter])
|
filter = options[:filter]
|
||||||
filter = Regexp.new($1)
|
|
||||||
end
|
|
||||||
type = "#{type}_methods"
|
type = "#{type}_methods"
|
||||||
total = if filter
|
total = if filter
|
||||||
suites.inject(0) {|n, suite| n + suite.send(type).grep(filter).size}
|
suites.inject(0) {|n, suite| n + suite.send(type).grep(filter).size}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#define RUBY_VERSION "2.3.0"
|
#define RUBY_VERSION "2.3.0"
|
||||||
#define RUBY_RELEASE_DATE "2016-04-17"
|
#define RUBY_RELEASE_DATE "2016-04-18"
|
||||||
#define RUBY_PATCHLEVEL 85
|
#define RUBY_PATCHLEVEL 86
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2016
|
#define RUBY_RELEASE_YEAR 2016
|
||||||
#define RUBY_RELEASE_MONTH 4
|
#define RUBY_RELEASE_MONTH 4
|
||||||
#define RUBY_RELEASE_DAY 17
|
#define RUBY_RELEASE_DAY 18
|
||||||
|
|
||||||
#include "ruby/version.h"
|
#include "ruby/version.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue