From d05ae0fd1732507bcf5ad3dbd0ba2ca77f22f633 Mon Sep 17 00:00:00 2001 From: James Henderson Date: Thu, 6 May 2021 09:44:36 +0100 Subject: [PATCH] [debuginfo-tests] Fix environment variable used to specify LLDB Currently, if the user specifies the environment variable 'CLANG', tests will attempt to use the value as a path to the clang executable. Previously, lldb could also be specified via the CLANG environment variable, but this was almost certainly a bug, because that meant both clang and lldb would have the same path. This patch changes the environment variable for lldb to 'LLDB'. Reviewed by: thopre, teemperor Differential Revision: https://reviews.llvm.org/D101982 --- debuginfo-tests/lit.cfg.py | 2 +- llvm/utils/lit/lit/TestingConfig.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/debuginfo-tests/lit.cfg.py b/debuginfo-tests/lit.cfg.py index 2de528ad6346..3ca6a67f0220 100644 --- a/debuginfo-tests/lit.cfg.py +++ b/debuginfo-tests/lit.cfg.py @@ -118,7 +118,7 @@ else: 'debuginfo-tests project.'.format(config.host_triple)) # Check which debuggers are available: -built_lldb = llvm_config.use_llvm_tool('lldb', search_env='CLANG') +built_lldb = llvm_config.use_llvm_tool('lldb', search_env='LLDB') lldb_path = None if built_lldb is not None: lldb_path = built_lldb diff --git a/llvm/utils/lit/lit/TestingConfig.py b/llvm/utils/lit/lit/TestingConfig.py index e1d13aa3a064..d534d895e4ba 100644 --- a/llvm/utils/lit/lit/TestingConfig.py +++ b/llvm/utils/lit/lit/TestingConfig.py @@ -22,12 +22,13 @@ class TestingConfig(object): } pass_vars = ['LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SYSTEMROOT', 'TERM', - 'CLANG', 'LD_PRELOAD', 'ASAN_OPTIONS', 'UBSAN_OPTIONS', - 'LSAN_OPTIONS', 'ADB', 'ANDROID_SERIAL', 'SSH_AUTH_SOCK', - 'SANITIZER_IGNORE_CVE_2016_2143', 'TMPDIR', 'TMP', 'TEMP', - 'TEMPDIR', 'AVRLIT_BOARD', 'AVRLIT_PORT', - 'FILECHECK_OPTS', 'VCINSTALLDIR', 'VCToolsinstallDir', - 'VSINSTALLDIR', 'WindowsSdkDir', 'WindowsSDKLibVersion'] + 'CLANG', 'LLDB', 'LD_PRELOAD', 'ASAN_OPTIONS', + 'UBSAN_OPTIONS', 'LSAN_OPTIONS', 'ADB', 'ANDROID_SERIAL', + 'SSH_AUTH_SOCK', 'SANITIZER_IGNORE_CVE_2016_2143', + 'TMPDIR', 'TMP', 'TEMP', 'TEMPDIR', 'AVRLIT_BOARD', + 'AVRLIT_PORT', 'FILECHECK_OPTS', 'VCINSTALLDIR', + 'VCToolsinstallDir', 'VSINSTALLDIR', 'WindowsSdkDir', + 'WindowsSDKLibVersion'] if sys.platform == 'win32': pass_vars.append('INCLUDE')