[debuginfo-tests] 6c330f0 - [debuginfo-tests] Remove explicit checks for Python 3

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 06:22:10 PST 2021


Author: James Henderson
Date: 2021-02-15T14:20:55Z
New Revision: 6c330f0df8da7f6b94f511fc3f5573003fdda093

URL: https://github.com/llvm/llvm-project/commit/6c330f0df8da7f6b94f511fc3f5573003fdda093
DIFF: https://github.com/llvm/llvm-project/commit/6c330f0df8da7f6b94f511fc3f5573003fdda093.diff

LOG: [debuginfo-tests] Remove explicit checks for Python 3

LLVM has a minimum requirement of python 3.6 now, and Python is
explicitly checked for in the LLVM CMakeLists.txt, so this check is no
longer needed here.

Differential Revision: https://reviews.llvm.org/D96499

Reviewed by: aprantl

Added: 
    

Modified: 
    debuginfo-tests/CMakeLists.txt
    debuginfo-tests/lit.cfg.py
    debuginfo-tests/lit.site.cfg.py.in

Removed: 
    


################################################################################
diff  --git a/debuginfo-tests/CMakeLists.txt b/debuginfo-tests/CMakeLists.txt
index 0abbe4604a79..0b01202a0bd0 100644
--- a/debuginfo-tests/CMakeLists.txt
+++ b/debuginfo-tests/CMakeLists.txt
@@ -54,10 +54,6 @@ if (WIN32)
   set(DEBUGINFO_TEST_DEPS ${DEBUGINFO_TEST_DEPS} lld)
 endif()
 
-if (NOT DEFINED Python3_EXECUTABLE)
-  message(FATAL_ERROR "Cannot run debuginfo-tests without python 3")
-endif()
-
 configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py

diff  --git a/debuginfo-tests/lit.cfg.py b/debuginfo-tests/lit.cfg.py
index bcf31c9d4b8d..da6cb9b63c01 100644
--- a/debuginfo-tests/lit.cfg.py
+++ b/debuginfo-tests/lit.cfg.py
@@ -102,14 +102,14 @@ def get_required_attr(config, attr_name):
 # for running a test.
 dexter_path = os.path.join(config.debuginfo_tests_src_root,
                            'dexter', 'dexter.py')
-dexter_test_cmd = '"{}" "{}" test'.format(config.python3_executable, dexter_path)
+dexter_test_cmd = '"{}" "{}" test'.format(sys.executable, dexter_path)
 if lldb_path is not None:
   dexter_test_cmd += ' --lldb-executable "{}"'.format(lldb_path)
 tools.append(ToolSubst('%dexter', dexter_test_cmd))
 
 # For testing other bits of dexter that aren't under the "test" subcommand,
 # have a %dexter_base substitution.
-dexter_base_cmd = '"{}" "{}"'.format(config.python3_executable, dexter_path)
+dexter_base_cmd = '"{}" "{}"'.format(sys.executable, dexter_path)
 tools.append(ToolSubst('%dexter_base', dexter_base_cmd))
 
 # Set up commands for DexTer regression tests.
@@ -129,8 +129,8 @@ def get_required_attr(config, attr_name):
 # Typical command would take the form:
 # ./path_to_py/python.exe ./path_to_dex/dexter.py test --fail-lt 1.0 -w --builder clang --debugger lldb --cflags '-O0 -g'
 dexter_regression_test_command = ' '.join(
-  # "python3", "dexter.py", test, fail_mode, builder, debugger, cflags, ldflags
-  ['"{}"'.format(config.python3_executable),
+  # "python", "dexter.py", test, fail_mode, builder, debugger, cflags, ldflags
+  ['"{}"'.format(sys.executable),
   '"{}"'.format(dexter_path),
   'test',
   '--fail-lt 1.0 -w',

diff  --git a/debuginfo-tests/lit.site.cfg.py.in b/debuginfo-tests/lit.site.cfg.py.in
index 4ed49b83bc35..4f463f49fa79 100644
--- a/debuginfo-tests/lit.site.cfg.py.in
+++ b/debuginfo-tests/lit.site.cfg.py.in
@@ -24,8 +24,6 @@ config.mlir_src_root = "@MLIR_SOURCE_DIR@"
 
 config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
 
-config.python3_executable = "@Python3_EXECUTABLE@"
-
 # Support substitution of the tools_dir with user parameters. This is
 # used when we can't determine the tool dir at configuration time.
 try:


        


More information about the llvm-commits mailing list