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 Name: bind
License: MPLv2.0 License: MPLv2.0
Version: 9.18.5 Version: 9.18.5
Release: 1%{?dist} Release: 2%{?dist}
Epoch: 32 Epoch: 32
Url: https://www.isc.org/downloads/bind/ 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} %if %{with UNITTEST}
pushd build pushd build
CPUS=$(lscpu -p=cpu,core | grep -v '^#' | wc -l) CPUS=$(lscpu -p=cpu,core | grep -v '^#' | wc -l)
THREADS="$CPUS"
if [ "$CPUS" -gt 16 ]; then if [ "$CPUS" -gt 16 ]; then
ORIGFILES=$(ulimit -n) 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 fi
make unit make unit -j${THREADS}
e=$? e=$?
if [ "$e" -ne 0 ]; then if [ "$e" -ne 0 ]; then
echo "ERROR: this build of BIND failed 'make unit'. Aborting." echo "ERROR: this build of BIND failed 'make unit'. Aborting."
@ -936,6 +938,9 @@ fi;
%endif %endif
%changelog %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 * Wed Aug 03 2022 Petr Menšík <pemensik@redhat.com> - 32:9.18.5-1
- Update to 9.18.5 (#2109170) - Update to 9.18.5 (#2109170)
- Return doc symlink to main page - Return doc symlink to main page