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.
This commit is contained in:
Brad King
2019-01-17 11:59:20 -05:00
parent 75a7a23746
commit 62fec84ad7

View File

@@ -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)