[libc-commits] [PATCH] D139216: [libc] Skip tests that depend on undefined targets
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Dec 2 11:35:35 PST 2022
jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, lntue, michaelrj.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
When we search through the dependencies for a test we somtimes query
`get_target_property` on a target that has not been defined. This is the
case for targets that have minimal entrypoints defined such as the WIP
GPU target. This patch changes all tests whose dependencies are
undefined to be skipped entirely.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139216
Files:
libc/cmake/modules/LLVMLibCTestRules.cmake
Index: libc/cmake/modules/LLVMLibCTestRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCTestRules.cmake
+++ libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -16,6 +16,11 @@
set(object_files "")
set(skipped_list "")
foreach(dep IN LISTS ARGN)
+ if (NOT TARGET ${dep})
+ # Skip any tests whose dependencies have not been defined.
+ list(APPEND skipped_list ${dep})
+ continue()
+ endif()
get_target_property(dep_type ${dep} "TARGET_TYPE")
if(NOT dep_type)
# Target for which TARGET_TYPE property is not set do not
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139216.479697.patch
Type: text/x-patch
Size: 617 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20221202/a1984402/attachment.bin>
More information about the libc-commits
mailing list