Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / arm / breakpoint-it / TestBreakpointIt.py
blob59615ddd2f01a4c4dea069f4589c2712c620ea37
1 """
2 Test that breakpoints in an IT instruction don't fire if their condition is
3 false.
4 """
7 import lldb
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
13 class TestBreakpointIt(TestBase):
14 NO_DEBUG_INFO_TESTCASE = True
16 @skipIf(archs=no_match(["arm"]))
17 @skipIf(archs=["arm64", "arm64e", "arm64_32"])
18 def test_false(self):
19 self.build()
20 exe = self.getBuildArtifact("a.out")
22 self.runCmd("target create %s" % exe)
23 lldbutil.run_break_set_by_symbol(
24 self, "bkpt_false", extra_options="--skip-prologue 0"
27 self.runCmd("run")
28 self.assertState(
29 self.process().GetState(), lldb.eStateExited, "Breakpoint does not get hit"
32 @skipIf(archs=no_match(["arm"]))
33 @skipIf(archs=["arm64", "arm64e", "arm64_32"])
34 def test_true(self):
35 self.build()
36 exe = self.getBuildArtifact("a.out")
38 self.runCmd("target create %s" % exe)
39 bpid = lldbutil.run_break_set_by_symbol(
40 self, "bkpt_true", extra_options="--skip-prologue 0"
43 self.runCmd("run")
44 self.assertIsNotNone(
45 lldbutil.get_one_thread_stopped_at_breakpoint_id(self.process(), bpid)