From 62fec84ad7b44b7c54130e9eb3686f4fbc22672e Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 17 Jan 2019 11:59:20 -0500 Subject: 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. --- Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v0.12