Author: David Spickett
Date: 2024-02-29T14:59:51Z
New Revision: 99824cf7967922bdd9ac895c949f330bb8d6b85a

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

LOG: [lldb][test] Use pexpect spawn instead of spawnu

This is marked deprecated from at least 4.6 onward:
Deprecated: pass encoding to spawn() instead.

Added: 
    

Modified: 
    lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py
    lldb/test/API/terminal/TestSTTYBeforeAndAfter.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py 
b/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py
index d7560156e0571a..15d9feb543895a 100644
--- a/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py
+++ b/lldb/test/API/macosx/nslog/TestDarwinNSLogOutput.py
@@ -56,8 +56,9 @@ def run_lldb_to_breakpoint(self, exe, source_file, line, 
settings_commands=None)
         # So that the child gets torn down after the test.
         import pexpect
 
-        self.child = pexpect.spawnu(
-            "%s %s %s" % (lldbtest_config.lldbExec, self.lldbOption, exe)
+        self.child = pexpect.spawn(
+            "%s %s %s" % (lldbtest_config.lldbExec, self.lldbOption, exe),
+            encoding="utf-8",
         )
         child = self.child
 

diff  --git a/lldb/test/API/terminal/TestSTTYBeforeAndAfter.py 
b/lldb/test/API/terminal/TestSTTYBeforeAndAfter.py
index e9b5940ff1adaf..31b960859fa2e5 100644
--- a/lldb/test/API/terminal/TestSTTYBeforeAndAfter.py
+++ b/lldb/test/API/terminal/TestSTTYBeforeAndAfter.py
@@ -37,7 +37,7 @@ def 
test_stty_dash_a_before_and_afetr_invoking_lldb_command(self):
         lldb_prompt = "(lldb) "
 
         # So that the child gets torn down after the test.
-        self.child = pexpect.spawnu("expect")
+        self.child = pexpect.spawn("expect", encoding="utf-8")
         child = self.child
 
         child.expect(expect_prompt)


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to