!19 【Mainline】Enable make check

From: @yixiangzhike 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2023-07-10 01:39:16 +00:00 committed by Gitee
commit 26f2497c31
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,10 +1,13 @@
%bcond_without enable_check
%bcond_with use_valgrind
%global servicename gssproxy
%global pubconfpath %{_sysconfdir}/gssproxy
%global gpstatedir %{_localstatedir}/lib/gssproxy
Name: gssproxy
Version: 0.9.1
Release: 2
Release: 3
Summary: GSSAPI Proxy
License: MIT
URL: https://github.com/gssapi/gssproxy
@ -25,6 +28,14 @@ BuildRequires: gettext-devel pkgconfig krb5-devel >= 1.12.0 libselinux-devel key
# for gssuserproxy.service --idle-timeout
BuildRequires: systemd-devel
%if %{with enable_check}
# for make check
BuildRequires: krb5-client krb5-server openldap-clients openldap-servers socket_wrapper nss_wrapper
%if %{with use_valgrind}
BuildRequires: valgrind glibc-debuginfo glibc
%endif
%endif
%description
This is a proxy for GSSAPI which deals with credential handling
@ -59,6 +70,17 @@ install -D -m644 examples/proxymech.conf %{buildroot}%{_sysconfdir}/gss/mech.d/p
install -m644 examples/24-nfs-server.conf %{buildroot}%{_sysconfdir}/gssproxy/24-nfs-server.conf
mkdir -p %{buildroot}%{gpstatedir}/rcache
%check
%if %{with enable_check}
# set timeout 60s
# enough time to execute
%if %{with use_valgrind}
%make_build check CHECKARGS=' --timeout=60'
%else
%make_build check CHECKARGS=' --timeout=60 --valgrind-cmd="" '
%endif
%endif
%post
%systemd_post gssproxy.service
@ -91,6 +113,9 @@ mkdir -p %{buildroot}%{gpstatedir}/rcache
%{_mandir}/man8/gssproxy-mech.8*
%changelog
* Fri Jul 7 2023 yixiangzhike <yixiangzhike007@163.com> - 0.9.1-3
- enable make check
* Mon Apr 10 2023 yixiangzhike <yixiangzhike007@163.com> - 0.9.1-2
- add BuildRequires:systemd-devel for option idle-timeout