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

Michal Privoznik mprivozn at redhat.com
Thu Nov 3 12:52:51 UTC 2016


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 at redhat.com>
>> ---
>>  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.

Michal




More information about the libvir-list mailing list