Use multiple threads on unit tests, but 16 at most

This commit is contained in:
Petr Menšík 2022-08-11 11:50:14 +02:00
parent b33592e3c6
commit bd4f2660ac

View File

@ -61,7 +61,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: MPLv2.0
Version: 9.18.5
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 32
Url: https://www.isc.org/downloads/bind/
#
@ -449,11 +449,13 @@ export TSAN_OPTIONS="log_exe_name=true log_path=ThreadSanitizer exitcode=0"
%if %{with UNITTEST}
pushd build
CPUS=$(lscpu -p=cpu,core | grep -v '^#' | wc -l)
THREADS="$CPUS"
if [ "$CPUS" -gt 16 ]; then
ORIGFILES=$(ulimit -n)
ulimit -n 4096 || : # Requires on some machines with many cores
THREADS=16
ulimit -n 8092 || : # Requires on some machines with many cores
fi
make unit
make unit -j${THREADS}
e=$?
if [ "$e" -ne 0 ]; then
echo "ERROR: this build of BIND failed 'make unit'. Aborting."
@ -936,6 +938,9 @@ fi;
%endif
%changelog
* Thu Aug 04 2022 Petr Menšík <pemensik@redhat.com> - 32:9.18.5-2
- Use multiple threads on unit tests, but 16 at most
* Wed Aug 03 2022 Petr Menšík <pemensik@redhat.com> - 32:9.18.5-1
- Update to 9.18.5 (#2109170)
- Return doc symlink to main page