libvirt-glib.spec.in | 6 ++++++ 1 file changed, 6 insertions(+)
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.
Show test suite log if a test fail.
---
libvirt-glib.spec.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libvirt-glib.spec.in b/libvirt-glib.spec.in
index a1ca11f..2b9296e 100644
--- a/libvirt-glib.spec.in
+++ b/libvirt-glib.spec.in
@@ -116,6 +116,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-gobject-1.0.la
%find_lang %{name}
+%check
+if ! make %{?_smp_mflags} check; then
+ cat tests/test-suite.log
+ exit 1
+fi
+
%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
On 10/30/2017 02:57 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. > Show test suite log if a test fail. > --- > libvirt-glib.spec.in | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/libvirt-glib.spec.in b/libvirt-glib.spec.in > index a1ca11f..2b9296e 100644 > --- a/libvirt-glib.spec.in > +++ b/libvirt-glib.spec.in > @@ -116,6 +116,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-gobject-1.0.la > > %find_lang %{name} > > +%check > +if ! make %{?_smp_mflags} check; then > + cat tests/test-suite.log I'd append "|| true" here. If tests fail really badly, test-suite.log may not even exist. > + exit 1 > +fi > + > %clean > rm -rf $RPM_BUILD_ROOT > > ACKed and pushed. Congratulations on your first libvirt-glib contribution! Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On 10/30/2017 03:59 PM, Michal Privoznik wrote: > On 10/30/2017 02:57 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. >> Show test suite log if a test fail. >> --- >> libvirt-glib.spec.in | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/libvirt-glib.spec.in b/libvirt-glib.spec.in >> index a1ca11f..2b9296e 100644 >> --- a/libvirt-glib.spec.in >> +++ b/libvirt-glib.spec.in >> @@ -116,6 +116,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libvirt-gobject-1.0.la >> >> %find_lang %{name} >> >> +%check >> +if ! make %{?_smp_mflags} check; then >> + cat tests/test-suite.log > > I'd append "|| true" here. If tests fail really badly, test-suite.log > may not even exist. > >> + exit 1 >> +fi >> + >> %clean >> rm -rf $RPM_BUILD_ROOT >> >> > > ACKed and pushed. > > Congratulations on your first libvirt-glib contribution! > > Michal Thank you very much! Marek -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2025 Red Hat, Inc.