summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2019-07-29 16:10:16 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2019-07-29 16:10:16 +0000
commit2b389517999eef70089811ca395a74b05d69c6cd (patch)
treec849fb79371b94c7ba2611072e4cb7abad9835f4 /lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
parentb32a6592ebc49cea15630dc9871533bd5455f2fc (diff)
downloadbcm5719-llvm-2b389517999eef70089811ca395a74b05d69c6cd.tar.gz
bcm5719-llvm-2b389517999eef70089811ca395a74b05d69c6cd.zip
[lldb] Increase testsuite packet-timeout 5secs -> 1min
rL357954 did increase `packet-timeout` 1sec -> 5secs. Which is IMO about the maximum timeout reasonable for regular use. But for testsuite I think the timeout should be higher as the testsuite runs in parallel and it can be run even on slow hosts and with other load (moreover if it runs on some slow arch). I have chosen 60 secs, that should be enough hopefully. Larger value could make debugging with hanging `lldb-server` annoying. This patch was based on this testsuite timeout: http://lab.llvm.org:8014/builders/lldb-x86_64-fedora/builds/546/steps/test/logs/stdio FAIL: test_connect (TestGDBRemoteClient.TestGDBRemoteClient) Test connecting to a remote gdb server ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py", line 13, in test_connect process = self.connect(target) File "/home/jkratoch/slave-lldb-x86_64-fedora/lldb-x86_64-fedora/llvm/tools/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py", line 480, in connect self.assertTrue(error.Success(), error.description) AssertionError: False is not True : failed to get reply to handshake packet Differential Revision: https://reviews.llvm.org/D65271 llvm-svn: 367234
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
index adb8ad50bff..638c038e169 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
@@ -99,7 +99,7 @@ def read_packet_thread(vs_comm):
class DebugCommunication(object):
- def __init__(self, recv, send):
+ def __init__(self, recv, send, init_commands):
self.trace_file = None
self.send = send
self.recv = recv
@@ -118,6 +118,7 @@ class DebugCommunication(object):
self.output = {}
self.configuration_done_sent = False
self.frame_scopes = {}
+ self.init_commands = init_commands
@classmethod
def encode_content(cls, s):
@@ -447,8 +448,7 @@ class DebugCommunication(object):
args_dict['waitFor'] = waitFor
if trace:
args_dict['trace'] = trace
- args_dict['initCommands'] = [
- 'settings set symbols.enable-external-lookup false']
+ args_dict['initCommands'] = self.init_commands
if initCommands:
args_dict['initCommands'].extend(initCommands)
if preRunCommands:
@@ -578,8 +578,7 @@ class DebugCommunication(object):
args_dict['shellExpandArguments'] = shellExpandArguments
if trace:
args_dict['trace'] = trace
- args_dict['initCommands'] = [
- 'settings set symbols.enable-external-lookup false']
+ args_dict['initCommands'] = self.init_commands
if initCommands:
args_dict['initCommands'].extend(initCommands)
if preRunCommands:
@@ -822,7 +821,7 @@ class DebugCommunication(object):
class DebugAdaptor(DebugCommunication):
- def __init__(self, executable=None, port=None):
+ def __init__(self, executable=None, port=None, init_commands=[]):
self.process = None
if executable is not None:
self.process = subprocess.Popen([executable],
@@ -830,11 +829,12 @@ class DebugAdaptor(DebugCommunication):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
DebugCommunication.__init__(self, self.process.stdout,
- self.process.stdin)
+ self.process.stdin, init_commands)
elif port is not None:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', port))
- DebugCommunication.__init__(self, s.makefile('r'), s.makefile('w'))
+ DebugCommunication.__init__(self, s.makefile('r'), s.makefile('w'),
+ init_commands)
def get_pid(self):
if self.process:
OpenPOWER on IntegriCloud