[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Default tests



Paul van Tilburg dijo [Sun, Oct 02, 2011 at 09:37:07PM +0200]:
> (...)
> As you all know, not all gems ship tests or working tests.  So some libs
> have tests disabled or no build-time test suite just yet.
> So, what if we put, by default, a very stupid syntax/load test in the
> generated debian-dir of a gem2debianized lib (e.g. ruby1.X -r<lib> or
> ruby -c <lib>.rb).  We would already catch problems such as the one for
> ruby-rchardet (dbts #643770).  (I also recall Ruby extentions that
> segfault when loaded by Ruby 1.9.1 in the past).
> 
> Now, it maybe hard to determine what <lib> should be in some cases,
> but if the gem2deb-generated boilerplate by default assumes <lib>
> to be the argument passed to gem2deb, we can get quite far.
> (Possible we can also figure it out from the gemspec?) One needs to
> change the boiler plate anyway, so it's easy to also touch
> debian/ruby-test.rb and it might even encourage people to fix/expand the
> tests.
> 
> Any thoughts?

Yes, I find it very sensible. Of course, this could be part of the
gem2deb procedure, overridable in case <lib> is either not correctly
guessed, or in case there is more than one library. The ideal would be
to include every source file shipped as a library - Although there
are many cases where libraries depend on symbols declared on other
libraries, so we cannot just do a recursive "ruby -l $foo" on all
lib/*.rb... But it would be the best way.


Reply to: