memory-hungry tests when building on koji builders with *lots* of cores

... so limit it to some reasonable number (4)
This commit is contained in:
Rex Dieter 2021-01-12 16:50:36 -06:00
parent c99e94ccd3
commit 87a1114ba4
2 changed files with 16 additions and 8 deletions

View File

@ -0,0 +1,11 @@
diff -up cmake-3.19.2/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake.CPACK_ARCHIVE_THREADS cmake-3.19.2/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake
--- cmake-3.19.2/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake.CPACK_ARCHIVE_THREADS 2020-12-16 06:35:29.000000000 -0600
+++ cmake-3.19.2/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake 2021-01-12 16:47:40.139581556 -0600
@@ -1,6 +1,6 @@
install(FILES CMakeLists.txt DESTINATION foo COMPONENT test)
-set(CPACK_ARCHIVE_THREADS 0)
+set(CPACK_ARCHIVE_THREADS 4)
if(PACKAGING_TYPE STREQUAL "COMPONENT")
set(CPACK_COMPONENTS_ALL test)

View File

@ -117,6 +117,9 @@ Patch1: %{name}-rename.patch
Patch2: %{name}-libarchive3.patch
%endif
%endif
# memory-hungry tests when building on koji builders with *lots* of cores
# so limit it to some reasonable number (4)
Patch3: cmake-3.19-CPACK_ARCHIVE_THREADS.patch
BuildRequires: coreutils
BuildRequires: findutils
@ -456,15 +459,9 @@ NO_TEST="$NO_TEST|kwsys.testProcess-4|kwsys.testProcess-5"
%if %{with bootstrap}
NO_TEST="$NO_TEST|curl"
%endif
%ifarch %{ix86}
# one test (sometimes?) runs out of memory, so limit parallelism as a workaround -- rdieter
%global smp_mflags -j2
%else
%global smp_mflags %{?smp_mflags}
%endif
bin/ctest%{?name_suffix} %{?smp_mflags} -V -E "$NO_TEST" --output-on-failure
bin/ctest%{?name_suffix} %{?_smp_mflags} -V -E "$NO_TEST" --output-on-failure
# Keep an eye on failing tests
bin/ctest%{?name_suffix} %{?smp_mflags} -V -R "$NO_TEST" --output-on-failure || :
bin/ctest%{?name_suffix} %{?_smp_mflags} -V -R "$NO_TEST" --output-on-failure || :
popd
%if 0%{?rhel} && 0%{?rhel} <= 6
mv -f Modules/FindLibArchive.disabled Modules/FindLibArchive.cmake