Author: Jonas Devlieghere
Date: 2023-08-25T12:59:52-07:00
New Revision: 37086cadb1aebb306e06a6a122c6a82305286c9d

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

LOG: [lldb] Use Popen.wait in TestVSCode_launch

Added: 
    

Modified: 
    lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py 
b/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
index 0a9e22a0c806ce..f6916964355df3 100644
--- a/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
+++ b/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
@@ -46,12 +46,8 @@ def test_termination(self):
         self.vscode.request_disconnect()
 
         # Wait until the underlying lldb-vscode process dies.
-        # We need to do this because the popen.wait function in python2.7
-        # doesn't have a timeout argument.
-        for _ in range(10):
-            time.sleep(1)
-            if self.vscode.process.poll() is not None:
-                break
+        self.vscode.process.wait(timeout=10)
+
         # Check the return code
         self.assertEqual(self.vscode.process.poll(), 0)
 


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

Reply via email to