On (13/11/15 09:37), Lukas Slebodnik wrote:
>ehlo,
>
>this patch depends on
>freeipa-lslebodn-0007-BUILD-provide-check-target-in-custom-Makefile.patch
>
>LS

>>From 507b57b4a166b0490d4217a9603a67577bb36036 Mon Sep 17 00:00:00 2001
>From: Lukas Slebodnik <lsleb...@redhat.com>
>Date: Fri, 13 Nov 2015 07:11:38 +0000
>Subject: [PATCH 8/8] SPEC: Run cmocka based uni test in %check phase
>
>---
> freeipa.spec.in | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/freeipa.spec.in b/freeipa.spec.in
>index 
>c3ca3413ffc3850b849a69adbbae8476355f3c76..fec2a83fcc83c02423601d88500e789c83f7a7d0
> 100644
>--- a/freeipa.spec.in
>+++ b/freeipa.spec.in
>@@ -405,6 +405,9 @@ make IPA_VERSION_IS_GIT_SNAPSHOT=no %{?_smp_mflags} all
> make IPA_VERSION_IS_GIT_SNAPSHOT=no %{?_smp_mflags} client
> %endif # ONLY_CLIENT
> 
>+%check
>+make %{?_smp_mflags} check VERBOSE=yes
>+

Tests were not executed in mock because there were missing build
dependencies. Updated patch is attached.

LS
>From d33f9c7994be5ab8964db297609b5267ed012295 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Fri, 13 Nov 2015 07:11:38 +0000
Subject: [PATCH 8/8] SPEC: Run cmocka based unit test in %check phase

This patch also consolidate build dependencies for
c based unit tests
---
 freeipa.spec.in | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/freeipa.spec.in b/freeipa.spec.in
index c3ca341..075b2ca 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -78,7 +78,6 @@ BuildRequires:  python-lxml
 BuildRequires:  python-pyasn1 >= 0.0.9a
 BuildRequires:  python-qrcode-core >= 5.0.0
 BuildRequires:  python-dns >= 1.11.1
-BuildRequires:  check
 BuildRequires:  libsss_idmap-devel
 BuildRequires:  libsss_nss_idmap-devel >= 1.12.2
 BuildRequires:  java-headless
@@ -99,6 +98,10 @@ BuildRequires:  python-six
 BuildRequires:  python-jwcrypto
 BuildRequires:  custodia
 
+# Build dependencies for unit tests
+BuildRequires:  libcmocka-devel
+BuildRequires:  nss_wrapper
+
 %description
 IPA is an integrated solution to provide centrally managed Identity (users,
 hosts, services), Authentication (SSO, 2FA), and Authorization
@@ -405,6 +408,9 @@ make IPA_VERSION_IS_GIT_SNAPSHOT=no %{?_smp_mflags} all
 make IPA_VERSION_IS_GIT_SNAPSHOT=no %{?_smp_mflags} client
 %endif # ONLY_CLIENT
 
+%check
+make %{?_smp_mflags} check VERBOSE=yes
+
 %install
 rm -rf %{buildroot}
 export SUPPORTED_PLATFORM=%{platform_module}
-- 
2.5.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to