From a663131b83859ef4bed89a720ecd0170c93df569 Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Wed, 8 Feb 2023 10:19:43 +0800 Subject: [PATCH] Enable make check Signed-off-by: yixiangzhike (cherry picked from commit 759ac74e9333b8298a575c7470a3e98e76c4ac07) --- libkcapi.spec | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/libkcapi.spec b/libkcapi.spec index 78a6ed5..7b7934d 100644 --- a/libkcapi.spec +++ b/libkcapi.spec @@ -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 - 1.2.0-5 +- Enable make check + * Fri Nov 20 2020 panxiaohe - 1.2.0-4 - Solve the failure when installing libkcapi-devel