From 184c6591ecda872310e20aa6c213910afa6dfa9c Mon Sep 17 00:00:00 2001 From: Andrew Kaylor Date: Fri, 4 Jan 2013 23:27:36 +0000 Subject: [PATCH] Generalizing expected stop reason string checking in InferiorCrashing test case. llvm-svn: 171554 --- .../inferior-crashing/TestInferiorCrashing.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py index 6bee74adec59..2ac6956104ad 100644 --- a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py +++ b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py @@ -39,14 +39,19 @@ class CrashingInferiorTestCase(TestBase): self.runCmd("run", RUN_SUCCEEDED) + if sys.platform.startswith("darwin"): + stop_reason = 'stop reason = EXC_BAD_ACCESS' + else: + stop_reason = 'stop reason = invalid address' + # The stop reason of the thread should be a bad access exception. self.expect("thread list", STOPPED_DUE_TO_EXC_BAD_ACCESS, substrs = ['stopped', - 'stop reason = EXC_BAD_ACCESS']) + stop_reason]) # And it should report the correct line number. self.expect("thread backtrace all", - substrs = ['stop reason = EXC_BAD_ACCESS', + substrs = [stop_reason, 'main.c:%d' % self.line]) def inferior_crashing_python(self): -- GitLab