Hi,
On 01/19/2010 04:08 PM, Chris Lumens wrote:
While working on a small bugfix for rawhide parted, I realized
that the spec file did not invoke the self tests.
Given that we have been spending a lot of time on test cases left
and right, I think we really should start adding %check sections
invoking these (during the build) for all packages we maintain.
Got a reference for where this section is described?
I'm afraid the documentation for the %check section is non existent.
Here is how it works (I have used it in several of my fedora packages),
a normal build (no %check in the specfile) goes like this:
- %prep
- %build
- %install
- check %files
- write rpms
With %check it goes like this:
- %prep
- %build
- %install
- check %files
- %check
- write rpms
The %check section is just like the %build /
%install section, iow the lines below it get
executed by sh in the dir where the extracted
sources are. And if a single line fails, the
section, and the build are aborted.
often %check is just:
%check
make selftest
Also see:
http://fedoraproject.org/wiki/PackagingTips/Perl
http://fedoraproject.org/wiki/Packaging:Cmake
For examples of %check usage.
Regards,
Hans
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list