diff --git a/debuginfo-tests/CMakeLists.txt b/debuginfo-tests/CMakeLists.txt index 9f488e92faf4df..745e2384f363e5 100644 --- a/debuginfo-tests/CMakeLists.txt +++ b/debuginfo-tests/CMakeLists.txt @@ -24,21 +24,20 @@ if (WIN32) 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")