[PATCH] D77944: [clangd][test] Provide registered targets to lit tests
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 11 13:19:40 PDT 2020
This revision was automatically updated to reflect the committed changes.
kadircet marked an inline comment as done.
Closed by commit rGd34a91a10f7a: [clangd][test] Provide registered targets to lit tests (authored by kadircet).
Changed prior to commit:
https://reviews.llvm.org/D77944?vs=256774&id=256797#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77944/new/
https://reviews.llvm.org/D77944
Files:
clang-tools-extra/clangd/test/lit.cfg.py
Index: clang-tools-extra/clangd/test/lit.cfg.py
===================================================================
--- clang-tools-extra/clangd/test/lit.cfg.py
+++ clang-tools-extra/clangd/test/lit.cfg.py
@@ -10,10 +10,19 @@
config.test_source_root = config.clangd_source_dir + "/test"
config.test_exec_root = config.clangd_binary_dir + "/test"
+
+# Used to enable tests based on the required targets. Can be queried with e.g.
+# REQUIRES: x86-registered-target
+def calculate_arch_features(arch_string):
+ return [arch.lower() + '-registered-target' for arch in arch_string.split()]
+
+
+lit.llvm.llvm_config.feature_config([('--targets-built',
+ calculate_arch_features)])
+
# Clangd-specific lit environment.
config.substitutions.append(('%clangd-benchmark-dir',
config.clangd_binary_dir + "/benchmarks"))
if config.clangd_build_xpc:
config.available_features.add('clangd-xpc-support')
-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77944.256797.patch
Type: text/x-patch
Size: 975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200411/2d479763/attachment-0001.bin>
More information about the cfe-commits
mailing list