aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py8
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbutil.py4
2 files changed, 12 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index d46e54f..d28e0d2 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -2474,6 +2474,14 @@ FileCheck output:
lldbutil.state_type_to_str(second), second)
self.fail(self._formatMessage(msg, error))
+ """Assert two stop reasons are equal"""
+ def assertStopReason(self, first, second, msg=None):
+ if first != second:
+ error = "{} ({}) != {} ({})".format(
+ lldbutil.stop_reason_to_str(first), first,
+ lldbutil.stop_reason_to_str(second), second)
+ self.fail(self._formatMessage(msg, error))
+
def createTestTarget(self, file_path=None, msg=None,
load_dependent_modules=True):
"""
diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py
index 7863e64..f21f492 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -266,6 +266,10 @@ def stop_reason_to_str(enum):
return "plancomplete"
elif enum == lldb.eStopReasonThreadExiting:
return "threadexiting"
+ elif enum == lldb.eStopReasonInstrumentation:
+ return "instrumentation"
+ elif enum == lldb.eStopReasonProcessorTrace:
+ return "processortrace"
else:
raise Exception("Unknown StopReason enum")