subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James McCoy <james...@debian.org>
Subject Re: [PATCH] Convert Ruby tests from test-unit to minitest
Date Sun, 08 Nov 2015 03:09:37 GMT
On Fri, Nov 06, 2015 at 10:56:49AM -0500, James McCoy wrote:
> On Nov 5, 2015 6:27 AM, "Philip Martin" <philip.martin@wandisco.com> wrote:
> >
> > James McCoy <jamessan@debian.org> writes:
> >
> > > Ruby 2.2 changed test/unit from an in-tree wrapper around minitest
> > > 4 to a bundled version of the externally maintained ruby-test-unit gem.
> > > Similarly, the in-tree minitest was removed and the externally
> > > maintained ruby-minitest gem (of the 5.x series) is bundled.  These
> > > changes broke check-swig-rb, since the test framework APIs behave
> > > differently.
> >
> > This patch works on my Debian/stable system but not on CentOS 7 which
> > only has minitest 4.3.2.
> 
> I've taken a look at instead supporting various versions of test-unit and
> should have a patch available tonight. I just need to do some more testing.

There's an outstanding issue that I've found in test_repos.rb's
test_load due to trying to modify a nil value, when Ruby 2.2 made
"frozen".  I'll follow up on this in another email.

The attached patch, however, at least gets the test suite working with
the test-unit gem, which is a pre-requisite for testing against Ruby
2.2.

[[[
Adapt Ruby tests to work with test-unit gem.

Ruby 2.2 bundles the test-unit gem instead of using the older "test-unit
API provided by minitest".  This also fixes testing when the test-unit
gem happens to be installed along with older Ruby versions.

* Makefile.in:
  (check-swig-rb): Detect whether test-unit supports the --collector
   argument and, if so, use the dir collector.

* subversion/bindings/swig/ruby/test/my-assertions.rb:
  (_my_assert_block): Remove unnecessary assert_block.

* subversion/bindings/swig/ruby/test/test_wc.rb:
  (test_context_create): Remove useless assertion on result of
   Svn::Wc::Create, especially since it varies based on Ruby version.
]]]

-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <jamessan@debian.org>

Mime
View raw message