Skip to content

Commit 92ef3aa

Browse files
authored
Merge pull request #1259 from ACSimon33/fix_python_test_summary
Fix Python test summary
2 parents 6e88a11 + 8d8625a commit 92ef3aa

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ message(STATUS "Build Index-64 API as extended API with _64 suffix: ${BUILD_INDE
123123

124124
include(GNUInstallDirs)
125125

126-
# Configure the warning and code coverage suppression file
127-
configure_file(
128-
"${LAPACK_SOURCE_DIR}/CTestCustom.cmake.in"
129-
"${LAPACK_BINARY_DIR}/CTestCustom.cmake"
130-
@ONLY
131-
)
132-
133126
include(PreventInSourceBuilds)
134127
include(PreventInBuildInstalls)
135128

@@ -186,6 +179,13 @@ if(BUILD_TESTING)
186179
else()
187180
message(STATUS "${_msg} - not found (skipping summary tests)")
188181
endif()
182+
183+
# Configure the warning and code coverage suppression file
184+
configure_file(
185+
"${LAPACK_SOURCE_DIR}/CTestCustom.cmake.in"
186+
"${LAPACK_BINARY_DIR}/CTestCustom.cmake"
187+
@ONLY
188+
)
189189
endif()
190190

191191
# --------------------------------------------------

CTestCustom.cmake.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
4747
)
4848

4949
# Only run post test if suitable python interpreter was found
50-
set(PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@)
50+
set(Python3_EXECUTABLE "@Python3_EXECUTABLE@")
5151
set(LAPACK_TESTING_USE_PYTHON @LAPACK_TESTING_USE_PYTHON@)
52-
if(PYTHON_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON)
53-
set(CTEST_CUSTOM_POST_TEST "${PYTHON_EXECUTABLE} ./lapack_testing.py -s -d TESTING")
52+
if(Python3_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON)
53+
set(CTEST_CUSTOM_POST_TEST "\"${Python3_EXECUTABLE}\" ./lapack_testing.py -s -d TESTING")
5454
endif()
5555

TESTING/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ add_subdirectory(EIG)
1515

1616

1717
# Only run this test if python 3 is found
18-
if(PYTHON_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON)
18+
if(Python3_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(
2222
NAME LAPACK_Test_Summary
2323
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}
24-
COMMAND ${PYTHON_EXECUTABLE} "lapack_testing.py"
24+
COMMAND ${Python3_EXECUTABLE} "lapack_testing.py"
2525
)
2626
endif()
2727

@@ -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 AND LAPACK_TESTING_USE_PYTHON)
41+
if(Python3_EXECUTABLE AND LAPACK_TESTING_USE_PYTHON)
4242
set_property(
4343
TEST LAPACK_Test_Summary
4444
APPEND PROPERTY DEPENDS LAPACK-${testName}

0 commit comments

Comments
 (0)