summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-17 16:59:20 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-17 17:01:07 (GMT)
commit62fec84ad7b44b7c54130e9eb3686f4fbc22672e (patch)
tree917afc5d56400a7ba9ea2f9952b5f4c1be505043 /Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
parent75a7a237465e37215525831f942a3904d20d1380 (diff)
downloadCMake-62fec84ad7b44b7c54130e9eb3686f4fbc22672e.zip
CMake-62fec84ad7b44b7c54130e9eb3686f4fbc22672e.tar.gz
CMake-62fec84ad7b44b7c54130e9eb3686f4fbc22672e.tar.bz2
Tests: Fix RunCMake.CTestCommandLine case when no python is found
Do not try to run the python checks if the python executable is not available.
Diffstat (limited to 'Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index c8ea3fc..52002ce 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -175,6 +175,9 @@ endfunction()
run_TestStdin()
function(show_only_json_check_python v)
+ if(RunCMake_TEST_FAILED OR NOT PYTHON_EXECUTABLE)
+ return()
+ endif()
set(json_file "${RunCMake_TEST_BINARY_DIR}/ctest.json")
file(WRITE "${json_file}" "${actual_stdout}")
set(actual_stdout "" PARENT_SCOPE)