[libvirt] [PATCH] spec: Enable unit tests during build

mkasik@redhat.com posted 1 patch 6 years, 5 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
libvirt-glib.spec.in | 3 +++
1 file changed, 3 insertions(+)
[libvirt] [PATCH] spec: Enable unit tests during build
Posted by mkasik@redhat.com 6 years, 5 months ago
From: Marek Kasik <mkasik@redhat.com>

Enable unit tests so that we can catch some problems soon enough
before the package gets to the users.

https://bugzilla.redhat.com/show_bug.cgi?id=1502639
---
 libvirt-glib.spec.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libvirt-glib.spec.in b/libvirt-glib.spec.in
index a1ca11f..7191862 100644
--- a/libvirt-glib.spec.in
+++ b/libvirt-glib.spec.in
@@ -116,6 +116,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-gobject-1.0.la
 
 %find_lang %{name}
 
+%check
+%__make %{?_smp_mflags} check
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-- 
2.14.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] spec: Enable unit tests during build
Posted by Michal Privoznik 6 years, 5 months ago
On 10/20/2017 01:51 PM, mkasik@redhat.com wrote:
> From: Marek Kasik <mkasik@redhat.com>
> 
> Enable unit tests so that we can catch some problems soon enough
> before the package gets to the users.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1502639
> ---
>  libvirt-glib.spec.in | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libvirt-glib.spec.in b/libvirt-glib.spec.in
> index a1ca11f..7191862 100644
> --- a/libvirt-glib.spec.in
> +++ b/libvirt-glib.spec.in
> @@ -116,6 +116,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-gobject-1.0.la
>  
>  %find_lang %{name}
>  
> +%check
> +%__make %{?_smp_mflags} check

Should we fail the build if 'make check' fails? E.g.

%check
if ! make %{?_smp_mflags} check; then
  cat tests/test-suite.log
  exit 1
fi

Also, please use libvirt-glib for $SUBJ prefix.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] spec: Enable unit tests during build
Posted by Marek Kasik 6 years, 4 months ago
On 10/26/2017 12:41 PM, Michal Privoznik wrote:
> On 10/20/2017 01:51 PM, mkasik@redhat.com wrote:
>> From: Marek Kasik <mkasik@redhat.com>
>>
>> Enable unit tests so that we can catch some problems soon enough
>> before the package gets to the users.
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=1502639
>> ---
>>   libvirt-glib.spec.in | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/libvirt-glib.spec.in b/libvirt-glib.spec.in
>> index a1ca11f..7191862 100644
>> --- a/libvirt-glib.spec.in
>> +++ b/libvirt-glib.spec.in
>> @@ -116,6 +116,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-gobject-1.0.la
>>   
>>   %find_lang %{name}
>>   
>> +%check
>> +%__make %{?_smp_mflags} check
> 
> Should we fail the build if 'make check' fails? E.g.
> 
> %check
> if ! make %{?_smp_mflags} check; then
>    cat tests/test-suite.log
>    exit 1
> fi

Yes, this improves debugging of possible failures. Thanks.


> Also, please use libvirt-glib for $SUBJ prefix.

I'm sorry about that. I tried but failed somehow. Hope that the patch 
comes with correct subject now.

> Michal

Regards

Marek

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