FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 04-30-2012, 03:41 PM
Toshio Kuratomi
 
Default should I include tests in the package?

On Mon, Apr 30, 2012 at 05:12:43PM +0200, Thomas Spura wrote:
> On Mon, Apr 30, 2012 at 3:57 PM, Jon Ciesla <limburgher@gmail.com> wrote:
> > On Mon, Apr 30, 2012 at 8:56 AM, Jon Ciesla <limburgher@gmail.com> wrote:
> >> On Mon, Apr 30, 2012 at 8:50 AM, "Germán A. Racca"
> >> <german.racca@gmail.com> wrote:
> >>> Hi list:
> >>>
> >>> I'm the packager of APLpy: http://aplpy.github.com/
> >>>
> >>> I'm going to update it to a new version, which comes with a set of tests,
> >>> but I'm not sure about what to do with them. I asked upstream and the answer
> >>> is:
> >>>
> >>> "The tests are there for us to diagnose any issues related to specific
> >>> dependency versions and platforms, and to make sure that we don't
> >>> break anything when making changes. It would be useful if you include
> >>> them so that we can ask users to run them if they are having issues we
> >>> can't reproduce, but you don't need to run the tests as part of the
> >>> build/setup."
> >>>
> >>> I'm still not sure. Should I include them in the package?
> >>
> >> Unless they impose huge build deps or something, run them in make check.
> >
> > To more directly answer your question, yes, include and run tests
> > whenever possible.
>
> This sounds like a SHOULD: include tests whenever possible...
>
> It's enough to run it in %check and normally a user of the package
> doesn't need to have the tests around.
> I'd only include them, when upstream wants to have tham in and
> installs them with "make" or "setup.py". And only in the latter case,
> you need to decide to split the tests into a subpackage.
>
Indeed:

http://fedoraproject.org/wiki/Packaging:Guidelines#Test_Suites

Whether to ship the tests for the end user is a more complicated problem
because test suites aren't terribly standardised and so different upstream
test suites may have various issues.

For instance, the APLpy runtests.py script has a chunk of encoded text at
the start. From the code that operates on it, I'm guessing that it's
a pickled compiled code block of a bundled library (python-py). That's
something we'd hesitate to run in the buildsys let alone on user's machines.

-Toshio
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 04-30-2012, 03:50 PM
Michael Schwendt
 
Default should I include tests in the package?

On Mon, 30 Apr 2012 09:54:58 -0500, JC (Jon) wrote:

> > Apart of this, experience tells, *-test packages cause more trouble thany
> > they use and often are removed in not too distant future.
> >
> Exactly, hence my suggestion to put it in %doc, to prevent deps,
> though it doesn't help with disk space as much as leaving it out.

Keeping the test-suite working outside its builddir creates maintenance
overhead. How often would you revisit the packaged %doc tests to check
that they still work? Sometimes developers know the tests are broken (or
some tests are broken) and then you get to keep the pieces. Often it's
necessary to beat into shape the tests anyway, since you cannot simply do

%doc src/tests/

or similar. The included Makefiles won't work anymore due to incompatible
paths (generated and hardcoded ones) in them and missing tools. Not pretty.

--
Fedora release 17 (Beefy Miracle) - Linux 3.3.4-1.fc17.x86_64
loadavg: 0.04 0.04 0.05
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-03-2012, 07:41 PM
"Germán A. Racca"
 
Default should I include tests in the package?

On 04/30/2012 11:54 AM, Jon Ciesla wrote:

On Mon, Apr 30, 2012 at 9:48 AM, Ralf Corsepius<rc040203@freenet.de> wrote:

On 04/30/2012 04:22 PM, "Germán A. Racca" wrote:


On 04/30/2012 11:09 AM, Tom Lane wrote:


=?ISO-8859-1?Q?=22Germ=E1n_A=2E_Racca=22?=<german.racca@gmail .com>
writes:


I'm the packager of APLpy: http://aplpy.github.com/
I'm going to update it to a new version, which comes with a set of
tests, but I'm not sure about what to do with them.



I think you do want to make the tests available to users, but they don't
necessarily have to be part of the base package.
If the tests are large relative to the base package, a fairly common
solution is to split them out into a sub-package, say aplpy-test.

(This is in addition to running them during the build.)

regards, tom lane



Hi Tom:

$ du -sh aplpy/
300K aplpy/

$ du -sh tests/
192K tests/

So I think that a split is not needed in this case.



This reasoning is dangerous:

a) Testsuites usually pull in further dependencies, which are not required
by the corresponding runtimes and therefore cause bloat.

b) If everybody thinks the "These 100k more don't matter" way, the distro
very soon will have problems.


That said, my pragmatical recommendation would be

a) Only explicitly package a testsuite, if upstream explicitly support this
(I.e. if "make install" or similar install this testsuite). And if, do so in
a separate package.

b) Check carefully, if a test is actually designed to be externally (often
this does not apply) or if it's an internal "self-testsuite".

Apart of this, experience tells, *-test packages cause more trouble thany
they use and often are removed in not too distant future.


Exactly, hence my suggestion to put it in %doc, to prevent deps,
though it doesn't help with disk space as much as leaving it out.

-J


Ralf




--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging


Finally, I have decided to run the tests in the spec file:

%check
%{__python} setup.py test

and to put the file runtests.py and tests/ directory in %doc because it
doesn't take much space and the user that decided to dig into the
package, can find the tests useful in some way.


Thanks to all that participated in this thread.

All the best,
Germán.

--
Germán A. Racca
Fedora Package Maintainer
https://fedoraproject.org/wiki/User:Skytux
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-04-2012, 03:24 PM
"Germán A. Racca"
 
Default should I include tests in the package?

On 04/30/2012 11:48 AM, Ralf Corsepius wrote:

On 04/30/2012 04:22 PM, "Germán A. Racca" wrote:

On 04/30/2012 11:09 AM, Tom Lane wrote:

=?ISO-8859-1?Q?=22Germ=E1n_A=2E_Racca=22?=<german.racca@gmail .com>
writes:

I'm the packager of APLpy: http://aplpy.github.com/
I'm going to update it to a new version, which comes with a set of
tests, but I'm not sure about what to do with them.


I think you do want to make the tests available to users, but they don't
necessarily have to be part of the base package.
If the tests are large relative to the base package, a fairly common
solution is to split them out into a sub-package, say aplpy-test.

(This is in addition to running them during the build.)

regards, tom lane


Hi Tom:

$ du -sh aplpy/
300K aplpy/

$ du -sh tests/
192K tests/

So I think that a split is not needed in this case.


This reasoning is dangerous:

a) Testsuites usually pull in further dependencies, which are not
required by the corresponding runtimes and therefore cause bloat.


Well, here I'm facing the problem that, for running the tests in %check
section (after %build), all the required packages for runtime are also
needed as BR.


Should I continue to run tests in %check and add the corresponding BRs?
In this case it'd be:


BuildRequires: python-devel numpy python-matplotlib pyfits pywcs
Requires: numpy python-matplotlib pyfits pywcs

Or should I stop because of this additional BRs?

Germán.


b) If everybody thinks the "These 100k more don't matter" way, the
distro very soon will have problems.


That said, my pragmatical recommendation would be

a) Only explicitly package a testsuite, if upstream explicitly support
this (I.e. if "make install" or similar install this testsuite). And if,
do so in a separate package.

b) Check carefully, if a test is actually designed to be externally
(often this does not apply) or if it's an internal "self-testsuite".

Apart of this, experience tells, *-test packages cause more trouble
thany they use and often are removed in not too distant future.


Ralf







--
Germán A. Racca
Fedora Package Maintainer
https://fedoraproject.org/wiki/User:Skytux
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-04-2012, 03:31 PM
Jon Ciesla
 
Default should I include tests in the package?

On Fri, May 4, 2012 at 10:24 AM, "Germán A. Racca"
<german.racca@gmail.com> wrote:
> On 04/30/2012 11:48 AM, Ralf Corsepius wrote:
>>
>> On 04/30/2012 04:22 PM, "Germán A. Racca" wrote:
>>>
>>> On 04/30/2012 11:09 AM, Tom Lane wrote:
>>>>
>>>> =?ISO-8859-1?Q?=22Germ=E1n_A=2E_Racca=22?=<german.racca@gmail .com>
>>>> writes:
>>>>>
>>>>> I'm the packager of APLpy: http://aplpy.github.com/
>>>>> I'm going to update it to a new version, which comes with a set of
>>>>> tests, but I'm not sure about what to do with them.
>>>>
>>>>
>>>> I think you do want to make the tests available to users, but they don't
>>>> necessarily have to be part of the base package.
>>>> If the tests are large relative to the base package, a fairly common
>>>> solution is to split them out into a sub-package, say aplpy-test.
>>>>
>>>> (This is in addition to running them during the build.)
>>>>
>>>> regards, tom lane
>>>
>>>
>>> Hi Tom:
>>>
>>> $ du -sh aplpy/
>>> 300K aplpy/
>>>
>>> $ du -sh tests/
>>> 192K tests/
>>>
>>> So I think that a split is not needed in this case.
>>
>>
>> This reasoning is dangerous:
>>
>> a) Testsuites usually pull in further dependencies, which are not
>> required by the corresponding runtimes and therefore cause bloat.
>
>
> Well, here I'm facing the problem that, for running the tests in %check
> section (after %build), all the required packages for runtime are also
> needed as BR.
>
> Should I continue to run tests in %check and add the corresponding BRs? In
> this case it'd be:
>
> BuildRequires: *python-devel numpy python-matplotlib pyfits pywcs
> Requires: * * * numpy python-matplotlib pyfits pywcs
>
> Or should I stop because of this additional BRs?

No, go ahead, that's appropriate.

-J

>
> Germán.
>
>> b) If everybody thinks the "These 100k more don't matter" way, the
>> distro very soon will have problems.
>>
>>
>> That said, my pragmatical recommendation would be
>>
>> a) Only explicitly package a testsuite, if upstream explicitly support
>> this (I.e. if "make install" or similar install this testsuite). And if,
>> do so in a separate package.
>>
>> b) Check carefully, if a test is actually designed to be externally
>> (often this does not apply) or if it's an internal "self-testsuite".
>>
>> Apart of this, experience tells, *-test packages cause more trouble
>> thany they use and often are removed in not too distant future.
>>
>>
>> Ralf
>>
>>
>>
>>
>
>
> --
> Germán A. Racca
> Fedora Package Maintainer
> https://fedoraproject.org/wiki/User:Skytux
> --
> packaging mailing list
> packaging@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/packaging



--
http://cecinestpasunefromage.wordpress.com/
------------------------------------------------
in your fear, seek only peace
in your fear, seek only love

-d. bowie
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 05-04-2012, 05:02 PM
"Germán A. Racca"
 
Default should I include tests in the package?

On 05/04/2012 12:31 PM, Jon Ciesla wrote:

On Fri, May 4, 2012 at 10:24 AM, "Germán A. Racca"
<german.racca@gmail.com> wrote:

On 04/30/2012 11:48 AM, Ralf Corsepius wrote:


On 04/30/2012 04:22 PM, "Germán A. Racca" wrote:


On 04/30/2012 11:09 AM, Tom Lane wrote:


=?ISO-8859-1?Q?=22Germ=E1n_A=2E_Racca=22?=<german.racca@gmail .com>
writes:


I'm the packager of APLpy: http://aplpy.github.com/
I'm going to update it to a new version, which comes with a set of
tests, but I'm not sure about what to do with them.



I think you do want to make the tests available to users, but they don't
necessarily have to be part of the base package.
If the tests are large relative to the base package, a fairly common
solution is to split them out into a sub-package, say aplpy-test.

(This is in addition to running them during the build.)

regards, tom lane



Hi Tom:

$ du -sh aplpy/
300K aplpy/

$ du -sh tests/
192K tests/

So I think that a split is not needed in this case.



This reasoning is dangerous:

a) Testsuites usually pull in further dependencies, which are not
required by the corresponding runtimes and therefore cause bloat.



Well, here I'm facing the problem that, for running the tests in %check
section (after %build), all the required packages for runtime are also
needed as BR.

Should I continue to run tests in %check and add the corresponding BRs? In
this case it'd be:

BuildRequires: python-devel numpy python-matplotlib pyfits pywcs
Requires: numpy python-matplotlib pyfits pywcs

Or should I stop because of this additional BRs?


No, go ahead, that's appropriate.

-J


Thank you Jon!

G.



Germán.


b) If everybody thinks the "These 100k more don't matter" way, the
distro very soon will have problems.


That said, my pragmatical recommendation would be

a) Only explicitly package a testsuite, if upstream explicitly support
this (I.e. if "make install" or similar install this testsuite). And if,
do so in a separate package.

b) Check carefully, if a test is actually designed to be externally
(often this does not apply) or if it's an internal "self-testsuite".

Apart of this, experience tells, *-test packages cause more trouble
thany they use and often are removed in not too distant future.


Ralf







--
Germán A. Racca
Fedora Package Maintainer
https://fedoraproject.org/wiki/User:Skytux
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging







--
Germán A. Racca
Fedora Package Maintainer
https://fedoraproject.org/wiki/User:Skytux
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 

Thread Tools




All times are GMT. The time now is 10:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org