This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [test] Skip ObjC-based tests via 'objc' category
ClosedPublic

Authored by mgorny on Nov 9 2020, 1:52 AM.

Details

Summary

Replace the plethora of ObjC-implied 'skipUnlessDarwin' decorators
with marking tests as 'objc' category (whenever missing), and skip all
ObjC tests on non-Darwin platforms. I have used '.categories' file
wherever it was present already or all (>1) tests were relying on ObjC,
and explicit add_test_categories() where there was only one test.

Diff Detail

Event Timeline

mgorny created this revision.Nov 9 2020, 1:52 AM
mgorny requested review of this revision.Nov 9 2020, 1:52 AM
mgorny added inline comments.Nov 9 2020, 1:55 AM
lldb/test/API/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCExpr.py
17

(this whole category has objc in .categories)

lldb/test/API/functionalities/tsan/multiple/TestTsanMultiple.py
16

This one's curious. I'm wondering why it's explicitly marked for all the platforms while it.s clearly a .m file ;-).

lldb/test/API/lang/objc/bitfield_ivars/TestBitfieldIvars.py
11

ditto

mgorny updated this revision to Diff 303800.Nov 9 2020, 2:42 AM

Failed to git add one of the .categories files.

teemperor accepted this revision.Nov 10 2020, 2:02 AM

LGTM. Thanks for cleaning this up, it's really appreciated!

lldb/packages/Python/lldbsuite/test/dotest.py
839

nit: we do from lldbsuite.test import lldbplatformutil in the surrounding code, so that seems more consistent.

lldb/test/API/functionalities/tsan/multiple/TestTsanMultiple.py
16

For the record: I think those XFails were just copied to all sanitizers tests that were failing on Linux (independently of whether the issue was lacking sanitizer support on Linux or as here Obj-C support missing).

This revision is now accepted and ready to land.Nov 10 2020, 2:02 AM
mgorny marked an inline comment as done.Nov 10 2020, 2:25 AM
mgorny added inline comments.
lldb/packages/Python/lldbsuite/test/dotest.py
839

Thanks, will fix it in place.

This revision was automatically updated to reflect the committed changes.
mgorny marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2020, 3:02 AM