[lldb/Test] Ensure inline tests have a unique build directory
authorJonas Devlieghere <jonas@devlieghere.com>
Thu, 11 Jun 2020 16:35:19 +0000 (09:35 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Thu, 11 Jun 2020 16:36:54 +0000 (09:36 -0700)
Inline tests have one method named 'test' which means that multiple
inline tests in the same file end up sharing the same build directory
per variant.

This patch overrides the getBuildDirBasename method for the InlineTest
class to include the test name.

Differential revision: https://reviews.llvm.org/D81516

lldb/packages/Python/lldbsuite/test/lldbinline.py

index 71143ce..29a7084 100644 (file)
@@ -82,6 +82,11 @@ class CommandParser:
 
 
 class InlineTest(TestBase):
+    # Overrides
+
+    def getBuildDirBasename(self):
+        return self.__class__.__name__ + "." + self.testMethodName
+
     # Internal implementation
 
     def BuildMakefile(self):