llvm-project
5799a5d2 - [lldb/test] Add generic test variant infrastructure (#185145)

Commit
21 days ago
[lldb/test] Add generic test variant infrastructure (#185145) Add a generic `TestVariant` class and `_expand_test_variants` function that can be used to create new test variant dimensions (similar to the existing debug_info variant expansion). Each TestVariant describes a dimension that multiplies test methods by different configurations. The infrastructure handles method expansion, xfail/skip decorator support, and setUp-time configuration. This also generalizes `_xfailForDebugInfo`/`_skipForDebugInfo` into `_xfailForVariant`/`_skipForVariant`, and changes the decorator's inner fn() to accept **kwargs so variant values can be passed by name. The `_test_variants` list is currently empty — downstream forks (i.e. swift) can register their own variants without modifying the metaclass logic. Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Author
Parents
Loading