[Lldb-commits] [lldb] [lldb] Add test variants to build directory name (PR #222792)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 10 14:50:42 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Dave Lee (kastiglione)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/222792.diff
1 Files Affected:
- (modified) lldb/packages/Python/lldbsuite/test/lldbtest.py (+11-4)
``````````diff
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 33ed383549032..bec50f806110b 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -840,10 +840,20 @@ def getSourceDir(self):
def getBuildDirBasename(self):
if self.SHARED_BUILD_TESTCASE:
- return self.__class__.__module__
+ return self.__class__.__module__ + self._getVariantSuffix()
else:
return self.__class__.__module__ + "." + self.testMethodName
+ def _getVariantSuffix(self) -> str:
+ """Return a suffix identifying the active build variants."""
+ parts = []
+ if debug_info := self.getDebugInfo():
+ parts.append(debug_info)
+ for variant in _test_variants:
+ if value := self.getVariant(variant.name):
+ parts.append(value)
+ return "." + "_".join(parts) if parts else ""
+
def getBuildDir(self):
"""Return the full path to the current test."""
return os.path.join(
@@ -2231,9 +2241,6 @@ 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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/222792
More information about the lldb-commits
mailing list