File tree Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Expand file tree Collapse file tree 4 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -213,12 +213,19 @@ jobs:
213
213
-D BUILD_TESTING:BOOL=ON
214
214
-D LAPACKE_WITH_TMG:BOOL=ON
215
215
-D BUILD_SHARED_LIBS:BOOL=ON
216
+ -D LAPACK_TESTING_USE_PYTHON:BOOL=OFF
216
217
217
218
- name : Build
218
219
run : cmake --build build --config ${{env.BUILD_TYPE}}
219
220
220
221
- name : Test
221
222
working-directory : ${{github.workspace}}/build
222
223
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)
46
46
endif ()
47
47
48
48
# Use valgrind if it is found
49
+ option ( LAPACK_TESTING_USE_PYTHON "Use Python for testing. Disable it on memory checks." ON )
49
50
find_program ( MEMORYCHECK_COMMAND valgrind )
50
51
if ( MEMORYCHECK_COMMAND )
51
52
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" )
53
54
endif ()
54
55
55
56
# 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
48
48
49
49
# Only run post test if suitable python interpreter was found
50
50
set (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)
52
53
set (CTEST_CUSTOM_POST_TEST "${PYTHON_EXECUTABLE} ./lapack_testing.py -s -d TESTING" )
53
54
endif ()
54
55
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ add_subdirectory(EIG)
15
15
16
16
17
17
# Only run this test if python 3 is found
18
- if (PYTHON_EXECUTABLE)
18
+ if (PYTHON_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON )
19
19
message (STATUS "Enabling LAPACK test summary (see TESTING/testing_results.txt)" )
20
20
file (COPY ${LAPACK_SOURCE_DIR} /lapack_testing.py DESTINATION ${LAPACK_BINARY_DIR} )
21
21
add_test (
@@ -38,7 +38,7 @@ function(add_lapack_test output input target)
38
38
-DINTDIR=${CMAKE_CFG_INTDIR}
39
39
-P "${LAPACK_SOURCE_DIR} /TESTING/runtest.cmake" )
40
40
41
- if (PYTHON_EXECUTABLE)
41
+ if (PYTHON_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON )
42
42
set_property (
43
43
TEST LAPACK_Test_Summary
44
44
APPEND PROPERTY DEPENDS LAPACK-${testName}
You can’t perform that action at this time.
0 commit comments