summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2018-07-27 23:42:34 +0000
committerRaphael Isemann <teemperor@gmail.com>2018-07-27 23:42:34 +0000
commit7bb4de47c9fc9b180d12dcd16d5d8a7e6596e432 (patch)
tree5c92feacdee7dbee94fc99d49387dae81b2bc6b6 /lldb/packages/Python/lldbsuite
parent2f6a1018e0894cddc3500a35d6ffcffa5f217870 (diff)
downloadbcm5719-llvm-7bb4de47c9fc9b180d12dcd16d5d8a7e6596e432.tar.gz
bcm5719-llvm-7bb4de47c9fc9b180d12dcd16d5d8a7e6596e432.zip
Add the actually calculated completions to COMPLETION_MSG
Summary: Otherwise this assertion message is not very useful to whoever is reading the log. Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D49947 llvm-svn: 338179
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py b/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
index 2366d9007e7..5d4fcf64511 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
@@ -313,8 +313,8 @@ class CommandLineCompletionTestCase(TestBase):
if turn_off_re_match:
self.expect(
compare_string, msg=COMPLETION_MSG(
- str_input, p), exe=False, substrs=[p])
+ str_input, p, match_strings), exe=False, substrs=[p])
else:
self.expect(
compare_string, msg=COMPLETION_MSG(
- str_input, p), exe=False, patterns=[p])
+ str_input, p, match_strings), exe=False, patterns=[p])
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index cdb227ea9f0..1b6302ae96a 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -184,9 +184,10 @@ def CMD_MSG(str):
return "Command '%s' returns successfully" % str
-def COMPLETION_MSG(str_before, str_after):
+def COMPLETION_MSG(str_before, str_after, completions):
'''A generic message generator for the completion mechanism.'''
- return "'%s' successfully completes to '%s'" % (str_before, str_after)
+ return ("'%s' successfully completes to '%s', but completions were:\n%s"
+ % (str_before, str_after, "\n".join(completions)))
def EXP_MSG(str, actual, exe):
OpenPOWER on IntegriCloud