diff --git a/ChangeLog b/ChangeLog index 883ed4bf12..ce252f1a1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +Mon Apr 18 13:48:05 2016 Nobuyoshi Nakada + + * 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 + + * 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 + + * 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 * parse.y (parse_ident): allow keyword arguments just after a diff --git a/common.mk b/common.mk index 7e19032408..d6811f42d9 100644 --- a/common.mk +++ b/common.mk @@ -153,8 +153,8 @@ PRE_LIBRUBY_UPDATE = $(MINIRUBY) -e 'ARGV[1] or File.unlink(ARGV[0]) rescue nil' $(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) diff --git a/cygwin/GNUmakefile.in b/cygwin/GNUmakefile.in index 14ffd1db85..edf02242ee 100644 --- a/cygwin/GNUmakefile.in +++ b/cygwin/GNUmakefile.in @@ -88,6 +88,13 @@ $(OBJS) $(MAINOBJ): win32.h 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) diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb index f9c106f9ed..c92a5ec01d 100644 --- a/test/lib/test/unit.rb +++ b/test/lib/test/unit.rb @@ -87,7 +87,7 @@ module Test 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 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 @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} diff --git a/version.h b/version.h index b797a8c094..7aca7a5597 100644 --- a/version.h +++ b/version.h @@ -1,10 +1,10 @@ #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"