[Libosinfo] [osinfo-db-tools PATCH 7/7] spec: Add %check target

Fabiano Fidêncio fidencio at redhat.com
Fri Apr 5 11:33:19 UTC 2019


Now that we have tests as part of osinfo-db-tools, let's enable them
when preparing a RPM.

https://gitlab.com/libosinfo/osinfo-db-tools/issues/2

Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
---
 osinfo-db-tools.spec.in | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/osinfo-db-tools.spec.in b/osinfo-db-tools.spec.in
index f0a5fcc..11314e0 100644
--- a/osinfo-db-tools.spec.in
+++ b/osinfo-db-tools.spec.in
@@ -27,6 +27,13 @@ information about operating systems for use with virtualization
 %configure
 %__make %{?_smp_mflags} V=1
 
+%check
+if ! make check
+then
+  cat tests/test-suite.log || true
+  exit 1
+fi
+
 %install
 %__make install DESTDIR=%{buildroot}
 
-- 
2.21.0




More information about the Libosinfo mailing list