[Lldb-commits] [lldb] [lldb] Consolidating platform support checks in tests. (PR #184656)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 4 12:47:35 PST 2026


================
@@ -59,7 +59,10 @@ class VariablesTest : public ::testing::Test {
   std::optional<llvm::sys::fs::TempFile> core;
   std::optional<llvm::sys::fs::TempFile> binary;
 
-  void CreateDebugger() { debugger = lldb::SBDebugger::Create(); }
+  void CreateDebugger() {
+    debugger = lldb::SBDebugger::Create();
+    SKIP_UNLESS_PLATFORM_SUPPORTED(debugger, "X86");
----------------
ashgti wrote:

I wasn't sure how to check for x86 support without loading the debugger. 

I moved the skips into each test instead and tried to make this more explicit by making `LoadCore` take the files file paths directly. So it looks like:

```
  CreateDebugger();
  SKIP_UNLESS_PLATFORM_SUPPORTED(debugger, "X86");
  std::tie(target, process) =
      lldb_private::LoadCore(debugger, k_binary_x86_64, k_core_x86_64);
```



https://github.com/llvm/llvm-project/pull/184656


More information about the lldb-commits mailing list