aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py b/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py
index 3ae7a20b4c7d..7fcb44f0b3ec 100644
--- a/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py
+++ b/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py
@@ -9,8 +9,9 @@ from __future__ import print_function
import os, time
import re
import lldb
-import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
# rdar://problem/8532131
# lldb not able to digest the clang-generated debug info correctly with respect to function name
@@ -32,6 +33,7 @@ class ConditionalBreakTestCase(TestBase):
self.build()
self.simulate_conditional_break_by_user()
+ @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr26265: args in frames other than #0 are not evaluated correctly")
def do_conditional_break(self):
"""Exercise some thread and frame APIs to break if c() is called by a()."""
exe = os.path.join(os.getcwd(), "a.out")
@@ -64,7 +66,8 @@ class ConditionalBreakTestCase(TestBase):
for j in range(10):
if self.TraceOn():
print("j is: ", j)
- thread = process.GetThreadAtIndex(0)
+ thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, breakpoint)
+ self.assertIsNotNone(thread, "Expected one thread to be stopped at the breakpoint")
if thread.GetNumFrames() >= 2:
frame0 = thread.GetFrameAtIndex(0)
@@ -82,8 +85,8 @@ class ConditionalBreakTestCase(TestBase):
# And the local variable 'val' should have a value of (int) 3.
val = frame1.FindVariable("val")
- self.assertTrue(val.GetTypeName() == "int", "'val' has int type")
- self.assertTrue(val.GetValue() == "3", "'val' has a value of 3")
+ self.assertEqual("int", val.GetTypeName())
+ self.assertEqual("3", val.GetValue())
break
process.Continue()