[DRE-maint] Bug#645357: gem2deb: add a syntax/load test

Lucas Nussbaum lucas at lucas-nussbaum.net
Fri Oct 14 20:36:05 UTC 2011


Package: gem2deb
Severity: wishlist

Full thread starting at
http://lists.debian.org/debian-ruby/2011/10/msg00009.html

----- Forwarded message from Gunnar Wolf <gwolf at gwolf.org> -----

From: Gunnar Wolf <gwolf at gwolf.org>
To: Debian Ruby list <debian-ruby at lists.debian.org>
Date: Thu, 6 Oct 2011 10:38:15 -0500
Subject: Re: Default tests
X-Mailing-List: <debian-ruby at lists.debian.org> archive/latest/1782
List-Id: <debian-ruby.lists.debian.org>

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.


-- 
To UNSUBSCRIBE, email to debian-ruby-REQUEST at lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster at lists.debian.org
Archive: http://lists.debian.org/20111006153815.GF8820@gwolf.org

----- End forwarded message -----





More information about the Pkg-ruby-extras-maintainers mailing list