Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lldbutil-tests / failed-to-hit-breakpoint / TestLLDBUtilFailedToHitBreakpoint.py
blob632645ac7c7df85c1edad224e1f15dd78db5c987
1 """
2 Tests lldbutil's behavior when running to a source breakpoint fails.
3 """
5 import lldb
6 import lldbsuite.test.lldbutil as lldbutil
7 from lldbsuite.test.lldbtest import *
8 from lldbsuite.test.decorators import *
11 class LLDBUtilFailedToHitBreakpointTest(TestBase):
12 NO_DEBUG_INFO_TESTCASE = True
14 @expectedFailureAll(oslist=["windows"])
15 def test_error_message(self):
16 """
17 Tests that run_to_source_breakpoint prints the right error message
18 when failing to hit the wanted breakpoint.
19 """
20 self.build()
21 with self.assertRaisesRegex(
22 AssertionError,
23 "Test process is not stopped at breakpoint: state: exited, exit code: 0, stdout: 'stdout_needlestderr_needle'",
25 lldbutil.run_to_source_breakpoint(
26 self, "// break here", lldb.SBFileSpec("main.cpp")