summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api/thread/TestThreadAPI.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/API/python_api/thread/TestThreadAPI.py')
-rw-r--r--lldb/test/API/python_api/thread/TestThreadAPI.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/lldb/test/API/python_api/thread/TestThreadAPI.py b/lldb/test/API/python_api/thread/TestThreadAPI.py
index a74302263aa4..1898c6a2a979 100644
--- a/lldb/test/API/python_api/thread/TestThreadAPI.py
+++ b/lldb/test/API/python_api/thread/TestThreadAPI.py
@@ -52,7 +52,6 @@ class ThreadAPITestCase(TestBase):
self.build()
self.validate_negative_indexing()
- @expectedFailureAll(oslist=["windows"])
def test_StepInstruction(self):
"""Test that StepInstruction preserves the plan stack."""
self.build()
@@ -324,34 +323,40 @@ class ThreadAPITestCase(TestBase):
self.assertGreater(
call_me_bkpt.GetNumLocations(), 0, "Got at least one location in call_me"
)
+
+ # On Windows this may be the full name "void __cdecl call_me(bool)",
+ # elsewhere it's just "call_me(bool)".
+ expected_name = r".*call_me\(bool\)$"
+
# Now run the expression, this will fail because we stopped at a breakpoint:
self.runCmd("expr -i 0 -- call_me(true)", check=False)
# Now we should be stopped in call_me:
- self.assertEqual(
- thread.frames[0].name, "call_me(bool)", "Stopped in call_me(bool)"
+ self.assertRegex(
+ thread.frames[0].name, expected_name, "Stopped in call_me(bool)"
)
+
# Now do a various API steps. These should not cause the expression context to get unshipped:
thread.StepInstruction(False)
- self.assertEqual(
+ self.assertRegex(
thread.frames[0].name,
- "call_me(bool)",
+ expected_name,
"Still in call_me(bool) after StepInstruction",
)
thread.StepInstruction(True)
- self.assertEqual(
+ self.assertRegex(
thread.frames[0].name,
- "call_me(bool)",
+ expected_name,
"Still in call_me(bool) after NextInstruction",
)
thread.StepInto()
- self.assertEqual(
+ self.assertRegex(
thread.frames[0].name,
- "call_me(bool)",
+ expected_name,
"Still in call_me(bool) after StepInto",
)
thread.StepOver(False)
- self.assertEqual(
+ self.assertRegex(
thread.frames[0].name,
- "call_me(bool)",
+ expected_name,
"Still in call_me(bool) after StepOver",
)