[Lldb-commits] [lldb] f2b5dc2 - [lldb] Fix: Disable shared build dir when testing with PDB (#190991)

via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 14 04:54:24 PDT 2026


Author: Stefan Gränitz
Date: 2026-04-14T13:54:19+02:00
New Revision: f2b5dc225889df4ca368db0f481c67dddf19c471

URL: https://github.com/llvm/llvm-project/commit/f2b5dc225889df4ca368db0f481c67dddf19c471
DIFF: https://github.com/llvm/llvm-project/commit/f2b5dc225889df4ca368db0f481c67dddf19c471.diff

LOG: [lldb] Fix: Disable shared build dir when testing with PDB (#190991)

The mechanism to disable `SHARED_BUILD_TESTCASE` for tests
that set `TEST_WITH_PDB_DEBUG_INFO` doesn't work. The property 
was set on the wrong object. This patch fixes it and moves the assignment
after the for-loop, since the respective dict only exists there.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbtest.py
    lldb/test/API/symstore/TestSymStore.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 919739dbcd1b4..f2a9f3bba1993 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1985,9 +1985,6 @@ def __new__(cls, name, bases, attrs):
         if original_testcase.NO_DEBUG_INFO_TESTCASE and not has_variant_tests:
             return original_testcase
 
-        if original_testcase.TEST_WITH_PDB_DEBUG_INFO:
-            original_testcase.SHARED_BUILD_TESTCASE = False
-
         # Default implementation for skip/xfail reason based on the debug category,
         # where "None" means to run the test as usual.
         def no_reason(*args, **kwargs):
@@ -2066,6 +2063,10 @@ def test_method(self, attrvalue=attrvalue):
 
             else:
                 newattrs[attrname] = attrvalue
+
+        if original_testcase.TEST_WITH_PDB_DEBUG_INFO:
+            newattrs["SHARED_BUILD_TESTCASE"] = False
+
         return super(LLDBTestCaseFactory, cls).__new__(cls, name, bases, newattrs)
 
 

diff  --git a/lldb/test/API/symstore/TestSymStore.py b/lldb/test/API/symstore/TestSymStore.py
index 5baa5fa4d0da8..b5c8fbb58324f 100644
--- a/lldb/test/API/symstore/TestSymStore.py
+++ b/lldb/test/API/symstore/TestSymStore.py
@@ -91,7 +91,6 @@ def __exit__(self, *exc_info):
 
 
 class SymStoreTests(TestBase):
-    SHARED_BUILD_TESTCASE = False
     TEST_WITH_PDB_DEBUG_INFO = True
 
     def build_inferior(self):


        


More information about the lldb-commits mailing list