ruby-changes:42553
From: naruse <ko1@a...>
Date: Mon, 18 Apr 2016 13:00:49 +0900 (JST)
Subject: [ruby-changes:42553] naruse:r54627 (ruby_2_3): merge revision(s) 54086, 54211, 54233: [Backport #12199]
naruse 2016-04-18 13:57:25 +0900 (Mon, 18 Apr 2016) New Revision: 54627 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54627 Log: 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] Modified directories: branches/ruby_2_3/ Modified files: branches/ruby_2_3/ChangeLog branches/ruby_2_3/common.mk branches/ruby_2_3/cygwin/GNUmakefile.in branches/ruby_2_3/test/lib/test/unit.rb branches/ruby_2_3/version.h Index: ruby_2_3/ChangeLog =================================================================== --- ruby_2_3/ChangeLog (revision 54626) +++ ruby_2_3/ChangeLog (revision 54627) @@ -1,3 +1,28 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/ChangeLog#L1 +Mon Apr 18 13:48:05 2016 Nobuyoshi Nakada <nobu@r...> + + * 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@r...> + + * 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@r...> + + * 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@r...> * parse.y (parse_ident): allow keyword arguments just after a Index: ruby_2_3/common.mk =================================================================== --- ruby_2_3/common.mk (revision 54626) +++ ruby_2_3/common.mk (revision 54627) @@ -153,8 +153,8 @@ PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARG https://github.com/ruby/ruby/blob/trunk/ruby_2_3/common.mk#L153 $(LIBRUBY_EXTS) $(LIBRUBY_SO_UPDATE) TESTSDIR = $(srcdir)/test -TEST_EXCLUDES = --excludes=$(TESTSDIR)/excludes -x /memory_leak/ -EXCLUDE_TESTFRAMEWORK = -x /testunit/ -x /minitest/ +TEST_EXCLUDES = --excludes-dir=$(TESTSDIR)/excludes --name=!/memory_leak/ +EXCLUDE_TESTFRAMEWORK = --exclude=/testunit/ --exclude=/minitest/ TESTWORKDIR = testwork TESTOPTS = $(RUBY_TESTOPTS) Index: ruby_2_3/cygwin/GNUmakefile.in =================================================================== --- ruby_2_3/cygwin/GNUmakefile.in (revision 54626) +++ ruby_2_3/cygwin/GNUmakefile.in (revision 54627) @@ -88,6 +88,13 @@ $(OBJS) $(MAINOBJ): win32.h https://github.com/ruby/ruby/blob/trunk/ruby_2_3/cygwin/GNUmakefile.in#L88 dir.$(OBJEXT) win32/win32.$(OBJEXT): win32/dir.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 $(LIBRUBY_SO): $(RUBYDEF) Index: ruby_2_3/version.h =================================================================== --- ruby_2_3/version.h (revision 54626) +++ ruby_2_3/version.h (revision 54627) @@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_3/version.h#L1 #define RUBY_VERSION "2.3.0" -#define RUBY_RELEASE_DATE "2016-04-17" -#define RUBY_PATCHLEVEL 85 +#define RUBY_RELEASE_DATE "2016-04-18" +#define RUBY_PATCHLEVEL 86 #define RUBY_RELEASE_YEAR 2016 #define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 17 +#define RUBY_RELEASE_DAY 18 #include "ruby/version.h" Index: ruby_2_3/test/lib/test/unit.rb =================================================================== --- ruby_2_3/test/lib/test/unit.rb (revision 54626) +++ ruby_2_3/test/lib/test/unit.rb (revision 54627) @@ -87,7 +87,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/lib/test/unit.rb#L87 end opts.on '-n', '--name PATTERN', "Filter test method names on pattern: /REGEXP/ or STRING" do |a| - options[:filter] = a + (options[:filter] ||= []) << a end opts.on '--test-order=random|alpha|sorted', [:random, :alpha, :sorted] do |a| @@ -96,6 +96,30 @@ module Test https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/lib/test/unit.rb#L96 end 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 end end @@ -589,9 +613,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/ruby_2_3/test/lib/test/unit.rb#L613 @verbose = !options[:parallel] @output = Output.new(self) end - if /\A\/(.*)\/\z/ =~ (filter = options[:filter]) - filter = Regexp.new($1) - end + filter = options[:filter] type = "#{type}_methods" total = if filter suites.inject(0) {|n, suite| n + suite.send(type).grep(filter).size} Property changes on: ruby_2_3 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r54086,54211,54233 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/