[all-commits] [llvm/llvm-project] 5d511b: [lldb][test] Unify test infrastructure for checkin...
Julian Lettner via All-commits
all-commits at lists.llvm.org
Wed Sep 24 13:31:23 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5d511b6736d0c70a99ea38bd800be0ffe65991e7
https://github.com/llvm/llvm-project/commit/5d511b6736d0c70a99ea38bd800be0ffe65991e7
Author: Julian Lettner <yln at users.noreply.github.com>
Date: 2025-09-24 (Wed, 24 Sep 2025)
Changed paths:
A lldb/packages/Python/lldbsuite/test/cpu_feature.py
M lldb/packages/Python/lldbsuite/test/decorators.py
M lldb/packages/Python/lldbsuite/test/lldbtest.py
M lldb/test/API/commands/register/register/register_command/TestRegisters.py
M lldb/test/API/macosx/sme-registers/TestSMERegistersDarwin.py
Log Message:
-----------
[lldb][test] Unify test infrastructure for checking CPU features (#153914)
This addresses limitations in our testing infrastructure for checking
CPU features. Before this
* `getCPUInfo()` was Linux-only, and the
* `@skipUnlessFeature` decorator was Darwin-only and did not consider
the remote (on device) testing use case.
Introduce `CPUFeature` class as an abstraction to hide the
platform-specific implementations to check for CPU features. Unify local
(on host) and remote (on device) test execution by always going through
`test.run_platform_command()` which uses LLDB's `platform shell <cmd>`
command.
Potential future cleanups: I think `@skipUnlessFeature` decorator could
be used in place of code like this:
```
if not self.isAArch64SME():
self.skipTest("SME must be present.")
if not self.isAArch64SME2():
self.skipTest("SME2 must be present.")
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list