ソースを参照

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.
Brad King 6 年 前
コミット
62fec84ad7
1 ファイル変更3 行追加0 行削除
  1. 3 0
      Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake

+ 3 - 0
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)