Enable make check

Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
(cherry picked from commit 759ac74e9333b8298a575c7470a3e98e76c4ac07)
This commit is contained in:
yixiangzhike 2023-02-08 10:19:43 +08:00 committed by openeuler-sync-bot
parent 16c07b3794
commit a663131b83

View File

@ -4,7 +4,7 @@
Name: libkcapi
Version: 1.2.0
Release: 4
Release: 5
Summary: libkcapi - Linux Kernel Crypto API User Space Interface Library
License: BSD or GPLv2
@ -155,6 +155,25 @@ bin/kcapi-hasher -n fipshmac -d %{buildroot}/%{_lib}/fipscheck %{buildroot}/%{
ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so.1.hmac
%check
for t in cppcheck scan;do
%make_build $t
done
# Lowest limit to run the testsuite. If we cannot obtain
# this value, we asume the testsuite cannot be run.
if [ -f /proc/sys/net/core/optmem_max ]; then
test_optmem_max=`%{__cat} /proc/sys/net/core/optmem_max`
else
test_optmem_max=0
fi
if [ $test_optmem_max -ge 20480 ];then
pushd test
ENABLE_FUZZ_TEST=1 \
NO_32BIT_TEST=1 \
./test-invocation.sh ||:
popd
fi
%files
%doc %dir %{_pkgdocdir}
@ -185,6 +204,9 @@ ln -s libkcapi.so.%{version}.hmac %{buildroot}/%{_lib}/fipscheck/libkcapi.so.
%{_mandir}/man3/kcapi_*.3.*
%changelog
* Wed Feb 8 2023 yixiangzhike <yixiangzhike007@163.com> - 1.2.0-5
- Enable make check
* Fri Nov 20 2020 panxiaohe <panxiaohe@huawei.com> - 1.2.0-4
- Solve the failure when installing libkcapi-devel