[Lldb-commits] [lldb] f22c63b - [lldb/test] Start pexpect tests with a custom HOME

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 14 06:18:43 PDT 2021


Author: Pavel Labath
Date: 2021-09-14T15:17:10+02:00
New Revision: f22c63b41bda01163a88b0bb9887a9324810732f

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

LOG: [lldb/test] Start pexpect tests with a custom HOME

This addresses the flakyness of (at least) TestMultilineNavigation,
which was failing when the editline history of a concurrently executing
test made leaked in. Using a test-specific home directory ensures the
tests are independent.

Added: 
    

Modified: 
    lldb/packages/Python/lldbsuite/test/lldbpexpect.py

Removed: 
    


################################################################################
diff  --git a/lldb/packages/Python/lldbsuite/test/lldbpexpect.py b/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
index f7c0e490105af..d3e3e8dde5d84 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
@@ -36,7 +36,8 @@ def launch(self, executable=None, extra_args=None, timeout=60, dimensions=None):
             args.extend(extra_args)
 
         env = dict(os.environ)
-        env["TERM"]="vt100"
+        env["TERM"] = "vt100"
+        env["HOME"] = self.getBuildDir()
 
         import pexpect
         self.child = pexpect.spawn(


        


More information about the lldb-commits mailing list