Re: packging guidelines and tests...

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

 



On Thu, Apr 10, 2008 at 1:57 AM, Gabor Szabo <szabgab@xxxxxxxxx> wrote:
>  Having the tests around as yet another set of examples and/or
>  documentation sounds good.

Ok, good to hear I'm not totally crazy :)

>  Keeping them to run them again will be more difficult
>  On the QA Hackathon in Oslo
>  http://perl-qa.hexten.net/wiki/index.php/Oslo_QA_Hackathon_2008
>  people (again) raised the desire to run all the tests of a module
>  again after installation.
>  Maybe at some later point after we have installed other things that
>  might interfere withe the module.
>  As I understand you are suggesting the same the difference is only
>  that you are suggesting it using rpm
>  while on the hackathon we talked about CPAN.pm installations.
>
>  There are at least two problems with this
>  1) In many times the tests assume the directory structure as they have
>  it in the distribution tarballs.
>  2) In many cases they also use various extra files.
>
>  In the rpm land it might be better to create separate source packages
>  for each CPAN distribution so
>  once can install those and run the tests from there.

Right now, my approach has been to mark t/ in the source dist as %doc.
 This preserves the directory structure of the tests, etc...  (See,
e.g., t/ for perl-Moose.) I haven't seen any issues where the tests
try to poke at anything outside that dir but in the source dist yet.

The issues I've seen are:

a) tests try to write to or generate files in t/
b) tests may cause false positives in rpm's perl auto-provides generator

Case a) is pretty uncommon.  Most test suites are well behaved, and
those that do generate bits along those lines I've found to be easily
patchable to point elsewhere.  b) is routine; just filter the false
hit the way we always do.... It's definitely more prevalent among,
say, Catalyst::* or Moose::*, where there are often specific test
classes.

They're easy to poke through in %doc, and with the package installed
it's also easy to run the tests (e.g. cd
/usr/share/doc/perl-MooseX-AttributeHelpers-* ; prove t/ ).  One thing
I am noticing, now that I'm actually giving a shot to running them
from there is that the pod tests tend to fail...  Hm.  Makes sense.

Aside from those issues, they do tend to package cleanly, and are
(currently, at least) nicely out of the way in %doc.

>  In any case I think it would be better to first discuss this on the
>  perl-qa list
>  http://lists.cpan.org/showlist.cgi?name=perl-qa and see what is the
>  opinion there.

Thanks for the pointer!  I'll bring it up over there when I have a second :)

                                             -Chris
-- 
Chris Weyl
Ex astris, scientia

--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
Fedora-perl-devel-list mailing list
Fedora-perl-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-perl-devel-list

[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux