diff --git a/espresso-unittest.patch b/espresso-unittest.patch new file mode 100644 index 0000000..77a8470 --- /dev/null +++ b/espresso-unittest.patch @@ -0,0 +1,63 @@ +diff --git a/testsuite/python/CMakeLists.txt b/testsuite/python/CMakeLists.txt +index 85fb180db..c6a87aba0 100644 +--- a/testsuite/python/CMakeLists.txt ++++ b/testsuite/python/CMakeLists.txt +@@ -55,6 +55,7 @@ function(PYTHON_TEST) + add_test(${TEST_NAME} ${CMAKE_BINARY_DIR}/pypresso ${PYPRESSO_OPTIONS} + ${TEST_FILE_CONFIGURED} ${TEST_ARGUMENTS}) + endif() ++ set_tests_properties(${TEST_NAME} PROPERTIES SKIP_RETURN_CODE 5) + set_tests_properties(${TEST_NAME} PROPERTIES PROCESSORS ${TEST_NUM_PROC} + DEPENDS "${TEST_DEPENDS}") + +diff --git a/testsuite/scripts/CMakeLists.txt b/testsuite/scripts/CMakeLists.txt +index a00b6de19..f243638a2 100644 +--- a/testsuite/scripts/CMakeLists.txt ++++ b/testsuite/scripts/CMakeLists.txt +@@ -39,6 +39,7 @@ macro(PYTHON_SCRIPTS_TEST) + string(REGEX REPLACE "^test_" "${TEST_TYPE}_" TEST_NAME ${TEST_NAME}) + add_test(${TEST_NAME} ${CMAKE_BINARY_DIR}/pypresso ${PYPRESSO_OPTIONS} + ${TEST_FILE_CONFIGURED}) ++ set_tests_properties(${TEST_NAME} PROPERTIES SKIP_RETURN_CODE 5) + set_tests_properties(${TEST_NAME} PROPERTIES FIXTURES_REQUIRED + IMPORTLIB_WRAPPER) + set_tests_properties(${TEST_NAME} PROPERTIES LABELS "${TEST_LABELS}") +diff --git a/testsuite/scripts/benchmarks/CMakeLists.txt b/testsuite/scripts/benchmarks/CMakeLists.txt +index c5880959c..9689b26ba 100644 +--- a/testsuite/scripts/benchmarks/CMakeLists.txt ++++ b/testsuite/scripts/benchmarks/CMakeLists.txt +@@ -25,6 +25,7 @@ endfunction(BENCHMARK_TEST) + # configure Python module importlib_wrapper.py + add_test(importlib_wrapper ${CMAKE_BINARY_DIR}/pypresso ${PYPRESSO_OPTIONS} + ${TEST_FILE_CONFIGURED_IMPORTLIB_WRAPPER}) ++set_tests_properties(importlib_wrapper PROPERTIES SKIP_RETURN_CODE 5) + set_tests_properties(importlib_wrapper PROPERTIES FIXTURES_SETUP + IMPORTLIB_WRAPPER) + set(benchmarks_tests ${benchmarks_tests} +diff --git a/testsuite/scripts/samples/CMakeLists.txt b/testsuite/scripts/samples/CMakeLists.txt +index d728c6b3a..e0dfb1b85 100644 +--- a/testsuite/scripts/samples/CMakeLists.txt ++++ b/testsuite/scripts/samples/CMakeLists.txt +@@ -25,6 +25,7 @@ endfunction(SAMPLE_TEST) + # configure Python module importlib_wrapper.py + add_test(importlib_wrapper ${CMAKE_BINARY_DIR}/pypresso ${PYPRESSO_OPTIONS} + ${TEST_FILE_CONFIGURED_IMPORTLIB_WRAPPER}) ++set_tests_properties(importlib_wrapper PROPERTIES SKIP_RETURN_CODE 5) + set_tests_properties(importlib_wrapper PROPERTIES FIXTURES_SETUP + IMPORTLIB_WRAPPER) + set(samples_tests ${samples_tests} ${TEST_FILE_CONFIGURED_IMPORTLIB_WRAPPER} +diff --git a/testsuite/scripts/tutorials/CMakeLists.txt b/testsuite/scripts/tutorials/CMakeLists.txt +index 6ea9dfb57..c67492954 100644 +--- a/testsuite/scripts/tutorials/CMakeLists.txt ++++ b/testsuite/scripts/tutorials/CMakeLists.txt +@@ -28,8 +28,10 @@ add_test(importlib_wrapper ${CMAKE_BINARY_DIR}/pypresso ${PYPRESSO_OPTIONS} + ${TEST_FILE_CONFIGURED_IMPORTLIB_WRAPPER}) + add_test(convert ${CMAKE_BINARY_DIR}/pypresso ${PYPRESSO_OPTIONS} + ${CMAKE_CURRENT_BINARY_DIR}/test_convert.py) ++set_tests_properties(importlib_wrapper PROPERTIES SKIP_RETURN_CODE 5) + set_tests_properties(importlib_wrapper PROPERTIES FIXTURES_SETUP + IMPORTLIB_WRAPPER) ++set_tests_properties(convert PROPERTIES SKIP_RETURN_CODE 5) + set_tests_properties(convert PROPERTIES FIXTURES_SETUP IMPORTLIB_WRAPPER) + set(tutorials_tests ${tutorials_tests} ${TEST_FILE_CONFIGURED_IMPORTLIB_WRAPPER} + PARENT_SCOPE) diff --git a/espresso.spec b/espresso.spec index cf4c5df..d9c9d8e 100644 --- a/espresso.spec +++ b/espresso.spec @@ -3,7 +3,7 @@ Name: espresso Version: 4.2.1 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Extensible Simulation Package for Research on Soft matter # segfault on s390x: https://github.com/espressomd/espresso/issues/3753 # segfault on armv7hl: https://src.fedoraproject.org/rpms/espresso/pull-request/4 @@ -21,6 +21,9 @@ Patch1: %{name}-tracers.patch # fix for GCC compiler warning -Warray-bounds # https://github.com/espressomd/espresso/pull/4715 Patch2: %{name}-array-bounds.patch +# fix API change in unittest from Python 3.12 +# https://github.com/espressomd/espresso/pull/4852 +Patch3: %{name}-unittest.patch BuildRequires: gcc-c++ BuildRequires: cmake3 >= 3.16 @@ -114,6 +117,7 @@ This package contains %{name} compiled against MPICH2. %patch 0 -p1 %patch 1 -p1 %patch 2 -p1 +%patch 3 -p1 %build %global defopts \\\ @@ -171,6 +175,9 @@ done %{python3_sitearch}/mpich/%{name}md/ %changelog +* Mon Jan 22 2024 Jean-Noël Grad - 4.2.1-8 +- Fix for API change in unittest from Python 3.12 + * Fri Jan 19 2024 Fedora Release Engineering - 4.2.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild