[Lldb-commits] [PATCH] D91003: [lldb] [test] Use skipUnlessDarwin for tests specific to Darwin

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 9 00:40:47 PST 2020

labath added a comment.

In D91003#2381892 <https://reviews.llvm.org/D91003#2381892>, @teemperor wrote:

> In D91003#2381885 <https://reviews.llvm.org/D91003#2381885>, @mgorny wrote:
>> In D91003#2381881 <https://reviews.llvm.org/D91003#2381881>, @labath wrote:
>>> If we put all of the objc tests into objc-specific directories (it looks like most of them are there already, but I spotted two outliers in this patch), then we could mark those directories with the existing "objc" category, and use the existing category-based skipping mechanism. I don't remember seeing the code for setting the objc category, so I don't know how it works, but it shouldn't be hard to make it skip this category on platforms which don't (currently) support objc.
>> Actually, I've started working on this but I don't know how to reliably detect all Darwin platforms, with all the weird simulator environments and so on, from lit.
> Could you just do this via a feature check? For libc++ we try compiling a dummy file (grep for `checkLibcxxSupport`) and we could do the same with a very simple Obj-C program including `NSObject.h`.

Doing this from lit might be nice (save time doing the check only once), but the current state-of-the-art is to determine the supported categories from within dotest (checkLibcxxSupport and friends).

In D91003#2381904 <https://reviews.llvm.org/D91003#2381904>, @teemperor wrote:

> Actually that might not work for testing remote platforms that support Obj-C from non-ObjC hosts, so I guess we have to check if we're on Darwin.

Moreover, I don't think that would actually reflect the state of the source code. I'd expect that debugging ObjC binary on some other platform would require an appropriate ObjCLanguageRuntime plugin (which we currently don't have).

  rG LLVM Github Monorepo



More information about the lldb-commits mailing list