On Wed, 5 Oct 2016 09:32:49 +0100
"Richard W.M. Jones" <[email protected]> wrote:
> On Wed, Oct 05, 2016 at 07:54:59AM +0200, Pavel Raiskup wrote:
> > On Tuesday, October 4, 2016 8:09:14 PM CEST Richard W.M. Jones
> > wrote:
> > > And related to this question, do we also need to define
> > > "TestRequires" packages/dependencies?
> >
> > Sounds like natural approach would be to install the built packages
> > into some minimal environment, and the packages itself should bring
> > the dependencies? OTOH, we should be able to limit the set of
> > packages to install in such case, somehow.
>
> The problem is suppose the tests need tool or framework 'X' in order
> to run the tests.
>
> If I was using RPM %check, then I would add:
>
> BuildRequires: X
>
> But (I assume?) BuildRequires won't be installed in this testing
> environment, so I now have to add instead:
>
> Requires: X
>
> That has obvious problems.
>
> > The TestRequires is interesting idea, too, FTR mentioned in
> > rhbz#1134397.
I haven't thought much about it yet how feasible it would be, but why
not "abuse" rpm infrastructure even for the tests? Introduce foo-test
package as a test-suite for package foo and do everything within its
spec file - install deps (as BRs), run the tests (in %check), run in
chroot, container or natively ... And package test results/logs into
the binary foo-test rpm :-) Or leave it without %files.
Dan
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]