File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -213,12 +213,19 @@ jobs:
213213 -D BUILD_TESTING:BOOL=ON
214214 -D LAPACKE_WITH_TMG:BOOL=ON
215215 -D BUILD_SHARED_LIBS:BOOL=ON
216+ -D LAPACK_TESTING_USE_PYTHON:BOOL=OFF
216217
217218 - name : Build
218219 run : cmake --build build --config ${{env.BUILD_TYPE}}
219220
220221 - name : Test
221222 working-directory : ${{github.workspace}}/build
222223 run : |
223- ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 -T memcheck
224- cat valgrind-out.txt
224+ ctest -C ${{env.BUILD_TYPE}} --schedule-random -j2 -T memcheck > memcheck.out
225+ if tail -n 1 memcheck.out | grep -q "Memory checking results:"; then
226+ cat memcheck.out
227+ exit 0
228+ else
229+ cat memcheck.out
230+ exit 1
231+ fi
Original file line number Diff line number Diff line change @@ -46,10 +46,11 @@ if(_is_coverage_build)
4646endif ()
4747
4848# Use valgrind if it is found
49+ option ( LAPACK_TESTING_USE_PYTHON "Use Python for testing. Disable it on memory checks." ON )
4950find_program ( MEMORYCHECK_COMMAND valgrind )
5051if ( MEMORYCHECK_COMMAND )
5152 message ( STATUS "Found valgrind: ${MEMORYCHECK_COMMAND} " )
52- set ( MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --show-leak-kinds=all --log-file=valgrind-out.txt -- track-origins=yes" )
53+ set ( MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --show-leak-kinds=all --track-origins=yes" )
5354endif ()
5455
5556# By default test Fortran compiler complex abs and complex division
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
4848
4949# Only run post test if suitable python interpreter was found
5050set (PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@)
51- if (PYTHON_EXECUTABLE)
51+ set (LAPACK_TESTING_USE_PYTHON @LAPACK_TESTING_USE_PYTHON@)
52+ if (PYTHON_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON)
5253 set (CTEST_CUSTOM_POST_TEST "${PYTHON_EXECUTABLE} ./lapack_testing.py -s -d TESTING" )
5354endif ()
5455
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ add_subdirectory(EIG)
1515
1616
1717# Only run this test if python 3 is found
18- if (PYTHON_EXECUTABLE)
18+ if (PYTHON_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON )
1919 message (STATUS "Enabling LAPACK test summary (see TESTING/testing_results.txt)" )
2020 file (COPY ${LAPACK_SOURCE_DIR} /lapack_testing.py DESTINATION ${LAPACK_BINARY_DIR} )
2121 add_test (
@@ -38,7 +38,7 @@ function(add_lapack_test output input target)
3838 -DINTDIR=${CMAKE_CFG_INTDIR}
3939 -P "${LAPACK_SOURCE_DIR} /TESTING/runtest.cmake" )
4040
41- if (PYTHON_EXECUTABLE)
41+ if (PYTHON_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON )
4242 set_property (
4343 TEST LAPACK_Test_Summary
4444 APPEND PROPERTY DEPENDS LAPACK-${testName}
You can’t perform that action at this time.
0 commit comments