Re: [PATCH] libvirt.spec: Build & run tests in parallel

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

 



On Thu, Nov 03, 2016 at 08:52:51PM +0800, Michal Privoznik wrote:
> On 03.11.2016 20:47, Daniel P. Berrange wrote:
> > On Thu, Nov 03, 2016 at 08:36:30PM +0800, Michal Privoznik wrote:
> >> So far, the main code is built in parallel, which makes it pretty
> >> fast. But with a lots of tests we have now I've noticed this part
> >> takes too much time to build. The problem was that tests were
> >> build and run in a single job.
> >>
> >> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> >> ---
> >>  libvirt.spec.in | 4 ++--
> >>  1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/libvirt.spec.in b/libvirt.spec.in
> >> index 545990c..4378d0a 100644
> >> --- a/libvirt.spec.in
> >> +++ b/libvirt.spec.in
> >> @@ -1290,7 +1290,7 @@ rm -fr %{buildroot}
> >>  
> >>  %check
> >>  cd tests
> >> -make
> >> +make %{?_smp_mflags}
> > 
> > Oh what's this cruft doing here - it is pointless - the
> > 'make' invocation in %build already built the tests.
> 
> No it isn't. The tests are build iff .git dir is present. Which it is
> not if the sources are unpacked from .tar.xz. That's why we have %check
> where we deliberately build test suite. In a single job.

It is still pointless actually - if WITH_TESTS is not defined (due to
lack of .git), then a bare 'make' will never build the tests whether
you run it from the top level, or from 'tests' sub-dir. The tests only
get built when you run 'make check'.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]