[PATCH] D101982: [debuginfo-tests] Allow use of environment variable to specify tools
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 6 02:07:39 PDT 2021
jhenderson created this revision.
jhenderson added reviewers: aprantl, dblaikie, mehdi_amini, JDevlieghere, aganea.
Herald added a subscriber: delcypher.
jhenderson requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Currently, if the user specifies the environment variable 'CLANG', tests will attempt to use teh value as a path to the clang executable. This patch expands this to work for lldb, clang++ and clang-cl, using the environment variables LLDB, CLANGPP, and CLANGCL.
Note that previously, lldb could 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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101982
Files:
debuginfo-tests/lit.cfg.py
llvm/utils/lit/lit/TestingConfig.py
Index: llvm/utils/lit/lit/TestingConfig.py
===================================================================
--- llvm/utils/lit/lit/TestingConfig.py
+++ llvm/utils/lit/lit/TestingConfig.py
@@ -22,8 +22,9 @@
}
pass_vars = ['LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SYSTEMROOT', 'TERM',
- 'CLANG', 'LD_PRELOAD', 'ASAN_OPTIONS', 'UBSAN_OPTIONS',
- 'LSAN_OPTIONS', 'ADB', 'ANDROID_SERIAL', 'SSH_AUTH_SOCK',
+ 'CLANG', 'CLANGPP', 'CLANGCL', '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',
Index: debuginfo-tests/lit.cfg.py
===================================================================
--- debuginfo-tests/lit.cfg.py
+++ debuginfo-tests/lit.cfg.py
@@ -110,15 +110,17 @@
llvm_config.with_environment('PATHTOCLANG',
add_host_triple(llvm_config.config.clang))
llvm_config.with_environment('PATHTOCLANGPP',
- add_host_triple(llvm_config.use_llvm_tool('clang++')))
+ add_host_triple(llvm_config.use_llvm_tool(
+ 'clang++', search_env='CLANGPP')))
llvm_config.with_environment('PATHTOCLANGCL',
- add_host_triple(llvm_config.use_llvm_tool('clang-cl')))
+ add_host_triple(llvm_config.use_llvm_tool(
+ 'clang-cl', search_env='CLANGCL')))
else:
print('Host triple {} not supported. Skipping dexter tests in the '
'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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101982.343326.patch
Type: text/x-patch
Size: 2192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210506/a9af131a/attachment.bin>
More information about the llvm-commits
mailing list