[debuginfo-tests] Update Python CMake variable
GitOrigin-RevId: ba8163e6290815a1deb9983772e70418d6915ac8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f488e9..745e238 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,21 +24,20 @@
set(DEBUGINFO_TEST_DEPS ${DEBUGINFO_TEST_DEPS} lld)
endif()
-if (NOT DEFINED PYTHON_EXECUTABLE)
- message(FATAL_ERROR "Cannot run debuginfo-tests without python")
-elseif(PYTHON_VERSION_MAJOR LESS 3)
+if (NOT DEFINED Python3_EXECUTABLE)
message(FATAL_ERROR "Cannot run debuginfo-tests without python 3")
-else()
- configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
- MAIN_CONFIG
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
- )
-
- add_lit_testsuite(check-debuginfo "Running debug info integration tests"
- ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${DEBUGINFO_TEST_DEPS}
- )
- set_target_properties(check-debuginfo PROPERTIES FOLDER "Debug info tests")
endif()
+
+configure_lit_site_cfg(
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
+ ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
+ MAIN_CONFIG
+ ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
+ )
+
+add_lit_testsuite(check-debuginfo "Running debug info integration tests"
+ ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS ${DEBUGINFO_TEST_DEPS}
+ )
+
+set_target_properties(check-debuginfo PROPERTIES FOLDER "Debug info tests")