Run valgrind-memcheck
This commit is contained in:
parent
ea4ffe97b1
commit
56fc361c2d
@ -6,6 +6,15 @@
|
||||
#endif
|
||||
|
||||
|
||||
# Run memcheck?
|
||||
# Valgrind does not work well on %%{power64} arches.
|
||||
%ifnarch %{power64}
|
||||
%bcond_without memcheck
|
||||
%else
|
||||
%bcond_with memcheck
|
||||
%endif
|
||||
|
||||
|
||||
# Shared object version of libcrypt.
|
||||
%if %{with new_api}
|
||||
%global soc 2
|
||||
@ -48,6 +57,11 @@
|
||||
--enable-shared \\\
|
||||
--enable-static \\\
|
||||
--disable-failure-tokens \\\
|
||||
%if %{with memcheck} \
|
||||
--enable-valgrind \\\
|
||||
%else \
|
||||
--disable-valgrind \\\
|
||||
%endif \
|
||||
--srcdir=.. \\\
|
||||
--with-pkgconfigdir=%{_libdir}/pkgconfig
|
||||
|
||||
@ -89,6 +103,9 @@ Patch0001: %{url}/compare/v%{version}...develop.patch#/%{name}-%{version}-t
|
||||
|
||||
BuildRequires: fipscheck
|
||||
BuildRequires: libtool
|
||||
%if %{with memcheck}
|
||||
BuildRequires: valgrind
|
||||
%endif
|
||||
|
||||
# We do not need to keep this forever.
|
||||
%if %{without new_api} && (0%{?fedora} && 0%{?fedora} <= 31) || (0%{?rhel} && 0%{?rhel} <= 10)
|
||||
@ -260,6 +277,16 @@ for dir in %{_vpath_builddir}; do
|
||||
echo "-----END TESTLOG: ${dir}-----";
|
||||
exit $rc;
|
||||
}
|
||||
%if %{with memcheck}
|
||||
%make_build -C ${dir} check-valgrind-memcheck || \
|
||||
{
|
||||
rc=$?;
|
||||
echo "-----BEGIN TESTLOG: ${dir}-----";
|
||||
%{__cat} ${dir}/test-suite-memcheck.log;
|
||||
echo "-----END TESTLOG: ${dir}-----";
|
||||
exit $rc;
|
||||
}
|
||||
%endif
|
||||
done
|
||||
|
||||
|
||||
@ -310,6 +337,7 @@ done
|
||||
%changelog
|
||||
* Thu Oct 25 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.2-2
|
||||
- Add patch updating to recent development version
|
||||
- Run valgrind-memcheck
|
||||
|
||||
* Thu Oct 18 2018 Björn Esser <besser82@fedoraproject.org> - 4.2.2-1
|
||||
- New upstream release
|
||||
|
Loading…
Reference in New Issue
Block a user