[Lldb-commits] [lldb] dc682ed - [test][lldb-vscode] Fix unclean shutdown in test_terminate_commands

Jordan Rupprecht via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 26 14:29:55 PST 2023


Author: Jordan Rupprecht
Date: 2023-01-26T14:29:48-08:00
New Revision: dc682ed590f73f7b7417ecf66d18b303ab957c62

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

LOG: [test][lldb-vscode] Fix unclean shutdown in test_terminate_commands

This test manually sends `terminateCommands` to shutdown, but then the test attempts another `terminateCommands` request in test tear down, which fails since it's already torn down. This error is ignored in LLDB's old fork of unittest2, but will be reported as a test failure in `unittest` from the Python standard library. Use `disconnectAutomatically` to avoid terminating twice.

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 6e916d72dda7d..e6976a8abffdc 100644
--- a/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
+++ b/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
@@ -445,7 +445,8 @@ def test_terminate_commands(self):
 
         terminateCommands = ['expr 4+2']
         self.launch(program=program,
-                    terminateCommands=terminateCommands)
+                    terminateCommands=terminateCommands,
+                    disconnectAutomatically=False)
         self.get_console()
         # Once it's disconnected the console should contain the
         # "terminateCommands"


        


More information about the lldb-commits mailing list