Files
clang-p2996/lldb/test/API/functionalities/breakpoint/hardware_breakpoints/base.py
Tatyana Krasnukha c114352edf [lldb/test] Put hardware breakpoint tests together, NFC
Create a common base class for them to re-use supports_hw_breakpoints function in decorators.

Differential Revision: https://reviews.llvm.org/D84311
2020-07-29 21:20:04 +03:00

20 lines
543 B
Python

"""
Base class for hardware breakpoints tests.
"""
from lldbsuite.test.lldbtest import *
class HardwareBreakpointTestBase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
def supports_hw_breakpoints(self):
self.build()
self.runCmd("file " + self.getBuildArtifact("a.out"),
CURRENT_EXECUTABLE_SET)
self.runCmd("breakpoint set -b main --hardware")
self.runCmd("run")
if 'stopped' in self.res.GetOutput():
return 'Hardware breakpoints are supported'
return None