Use macro to control whether to enable make check

Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
(cherry picked from commit 201f1d72e8e8ae583eafc6c0818d5834280892b9)
This commit is contained in:
yixiangzhike 2023-02-09 16:52:46 +08:00 committed by openeuler-sync-bot
parent 807872082c
commit 116c822921

View File

@ -2,9 +2,11 @@
%global sysctl_optmem_max 81920
%global distroname_ext %{_vendor}
%bcond_with enable_test
Name: libkcapi
Version: 1.2.0
Release: 5
Release: 6
Summary: libkcapi - Linux Kernel Crypto API User Space Interface Library
License: BSD or GPLv2
@ -155,6 +157,7 @@ bin/kcapi-hasher -n fipshmac -d %{buildroot}/%{_lib}/fipscheck %{buildroot}/%{
ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so.1.hmac
%check
%if %{with enable_test}
for t in cppcheck scan;do
%make_build $t
done
@ -174,6 +177,7 @@ NO_32BIT_TEST=1 \
./test-invocation.sh ||:
popd
fi
%endif
%files
%doc %dir %{_pkgdocdir}
@ -204,6 +208,9 @@ fi
%{_mandir}/man3/kcapi_*.3.*
%changelog
* Thu Feb 9 2023 yixiangzhike <yixiangzhike007@163.com> - 1.2.0-6
- Use macro to control whether to enable make check
* Wed Feb 8 2023 yixiangzhike <yixiangzhike007@163.com> - 1.2.0-5
- Enable make check