From ba8163e6290815a1deb9983772e70418d6915ac8 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 29 Apr 2020 09:51:24 -0700 Subject: [PATCH] [debuginfo-tests] Update Python CMake variable --- debuginfo-tests/CMakeLists.txt | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/debuginfo-tests/CMakeLists.txt b/debuginfo-tests/CMakeLists.txt index 9f488e9..745e238 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") -- 2.7.4