summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/thread
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/API/functionalities/thread')
-rw-r--r--lldb/test/API/functionalities/thread/step_until/TestStepUntil.py10
-rw-r--r--lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py50
2 files changed, 40 insertions, 20 deletions
diff --git a/lldb/test/API/functionalities/thread/step_until/TestStepUntil.py b/lldb/test/API/functionalities/thread/step_until/TestStepUntil.py
index 965da02ed0f9..afdc92dd4000 100644
--- a/lldb/test/API/functionalities/thread/step_until/TestStepUntil.py
+++ b/lldb/test/API/functionalities/thread/step_until/TestStepUntil.py
@@ -1,10 +1,9 @@
"""Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
-
-import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+from lldbsuite.test_event.build_exception import BuildError
class StepUntilTestCase(TestBase):
@@ -112,10 +111,15 @@ class StepUntilTestCase(TestBase):
@no_debug_info_test
@skipIf(oslist=lldbplatformutil.getDarwinOSTriples() + ["windows"])
@skipIf(archs=no_match(["x86_64", "aarch64"]))
+ @skipIf(compiler=no_match(["clang"]))
def test_bad_line_discontinuous(self):
"""Test that we get an error if attempting to step outside the current
function -- and the function is discontinuous"""
- self.build(dictionary=self._build_dict_for_discontinuity())
+ try:
+ self.build(dictionary=self._build_dict_for_discontinuity())
+ except BuildError as ex:
+ self.skipTest(f"failed to build with linker script.")
+
_, _, thread, _ = lldbutil.run_to_source_breakpoint(
self, "At the start", lldb.SBFileSpec(self.main_source)
)
diff --git a/lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py b/lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py
index 59e028acf014..08d78fb996c7 100644
--- a/lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py
+++ b/lldb/test/API/functionalities/thread/step_until/TestStepUntilAPI.py
@@ -1,7 +1,7 @@
-import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
+from lldbsuite.test_event.build_exception import BuildError
class TestStepUntilAPI(TestBase):
@@ -74,15 +74,20 @@ class TestStepUntilAPI(TestBase):
@skipIf(oslist=lldbplatformutil.getDarwinOSTriples() + ["windows"])
@skipIf(archs=no_match(["x86_64", "aarch64"]))
+ @skipIf(compiler=no_match(["clang"]))
def test_hitting_discontinuous(self):
"""Test SBThread.StepOverUntil - targeting a line and hitting it -- with
discontinuous functions"""
- self._do_until(
- self._build_dict_for_discontinuity(),
- None,
- self.less_than_two,
- self.less_than_two,
- )
+ try:
+ self._do_until(
+ self._build_dict_for_discontinuity(),
+ None,
+ self.less_than_two,
+ self.less_than_two,
+ )
+ except BuildError as ex:
+ self.skipTest(f"failed to build with linker script.")
+
self._assertDiscontinuity()
def test_missing(self):
@@ -93,15 +98,20 @@ class TestStepUntilAPI(TestBase):
@skipIf(oslist=lldbplatformutil.getDarwinOSTriples() + ["windows"])
@skipIf(archs=no_match(["x86_64", "aarch64"]))
+ @skipIf(compiler=no_match(["clang"]))
def test_missing_discontinuous(self):
"""Test SBThread.StepOverUntil - targeting a line and missing it by
stepping out to call site -- with discontinuous functions"""
- self._do_until(
- self._build_dict_for_discontinuity(),
- ["foo", "bar", "baz"],
- self.less_than_two,
- self.back_out_in_main,
- )
+ try:
+ self._do_until(
+ self._build_dict_for_discontinuity(),
+ ["foo", "bar", "baz"],
+ self.less_than_two,
+ self.back_out_in_main,
+ )
+ except BuildError as ex:
+ self.skipTest(f"failed to build with linker script.")
+
self._assertDiscontinuity()
def test_bad_line(self):
@@ -120,13 +130,19 @@ class TestStepUntilAPI(TestBase):
@skipIf(oslist=lldbplatformutil.getDarwinOSTriples() + ["windows"])
@skipIf(archs=no_match(["x86_64", "aarch64"]))
+ @skipIf(compiler=no_match(["clang"]))
def test_bad_line_discontinuous(self):
"""Test that we get an error if attempting to step outside the current
function -- and the function is discontinuous"""
- self.build(dictionary=self._build_dict_for_discontinuity())
- _, _, thread, _ = lldbutil.run_to_source_breakpoint(
- self, "At the start", self.main_spec
- )
+
+ try:
+ self.build(dictionary=self._build_dict_for_discontinuity())
+ _, _, thread, _ = lldbutil.run_to_source_breakpoint(
+ self, "At the start", self.main_spec
+ )
+ except BuildError as ex:
+ self.skipTest(f"failed to build with linker script.")
+
self.assertIn(
"step until target not in current function",
thread.StepOverUntil(