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

Re: gem2deb: support for building using setup.rb



Vincent Fourmond escreveu isso aí:
>   Hi Lucas !
> 
> On Tue, May 17, 2011 at 8:16 AM, Lucas Nussbaum
> <lucas@lucas-nussbaum.net> wrote:
> >>   I'm unsure about that: the testrunner.rb uses the source directory
> >> as library path for loading the test files. Of course, this will work
> >> for pure ruby libraries, but, at least for setup.rb, it will fail
> >> miserably for built extensions, since the build cleans up the built
> >> files in the source after installing. I'm wondering: shouldn't
> >> testrunner.rb rather use debian/package/usr/lib/vendor_ruby and co as
> >> library path ? This is guaranteed to work, at least if tests are run
> >> *after* installation (which is the case) ?
> >
> > Mmmh, yes, probably. Could you experiment with the idea and provide a
> > patch? :)
> 
>   Here it is. Changing the load path exposed a bug in the
> simpleextension test suite. After that was fixed, gem2deb builds
> without failures. Attached is the diff that does the trick (don't
> forget to rebuild the simpleextension gem !!).

Applied, thanks!

>   BTW: is there any compelling reason to have the test's .gem files in
> the source package (and in the git respository) ? They are useless
> since they can be rebuilt at build time, and it took me a very long
> time to understand why my modifications to the simpleextension test
> suite did not seem to have any effect at all ;-)...

IMO, having the .gem files with fixed contents makes the tests run
against fixed, known input data. If we generate the .gem while running
the tests then gem2deb's tests could fail because of a breakage in
rake's gem package test or because of any other problem unrelated to
gem2deb, and we do not want that.

-- 
Antonio Terceiro <terceiro@softwarelivre.org>
http://softwarelivre.org/terceiro


Attachment: signature.asc
Description: Digital signature


Reply to: