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