1- import lldb
21from lldbsuite .test .decorators import *
32from lldbsuite .test .lldbtest import *
43from lldbsuite .test import lldbutil
4+ from lldbsuite .test_event .build_exception import BuildError
55
66
77class TestStepUntilAPI (TestBase ):
@@ -74,15 +74,20 @@ def test_hitting(self):
7474
7575 @skipIf (oslist = lldbplatformutil .getDarwinOSTriples () + ["windows" ])
7676 @skipIf (archs = no_match (["x86_64" , "aarch64" ]))
77+ @skipIf (compiler = no_match (["clang" ]))
7778 def test_hitting_discontinuous (self ):
7879 """Test SBThread.StepOverUntil - targeting a line and hitting it -- with
7980 discontinuous functions"""
80- self ._do_until (
81- self ._build_dict_for_discontinuity (),
82- None ,
83- self .less_than_two ,
84- self .less_than_two ,
85- )
81+ try :
82+ self ._do_until (
83+ self ._build_dict_for_discontinuity (),
84+ None ,
85+ self .less_than_two ,
86+ self .less_than_two ,
87+ )
88+ except BuildError as ex :
89+ self .skipTest (f"failed to build with linker script." )
90+
8691 self ._assertDiscontinuity ()
8792
8893 def test_missing (self ):
@@ -93,15 +98,20 @@ def test_missing(self):
9398
9499 @skipIf (oslist = lldbplatformutil .getDarwinOSTriples () + ["windows" ])
95100 @skipIf (archs = no_match (["x86_64" , "aarch64" ]))
101+ @skipIf (compiler = no_match (["clang" ]))
96102 def test_missing_discontinuous (self ):
97103 """Test SBThread.StepOverUntil - targeting a line and missing it by
98104 stepping out to call site -- with discontinuous functions"""
99- self ._do_until (
100- self ._build_dict_for_discontinuity (),
101- ["foo" , "bar" , "baz" ],
102- self .less_than_two ,
103- self .back_out_in_main ,
104- )
105+ try :
106+ self ._do_until (
107+ self ._build_dict_for_discontinuity (),
108+ ["foo" , "bar" , "baz" ],
109+ self .less_than_two ,
110+ self .back_out_in_main ,
111+ )
112+ except BuildError as ex :
113+ self .skipTest (f"failed to build with linker script." )
114+
105115 self ._assertDiscontinuity ()
106116
107117 def test_bad_line (self ):
@@ -120,13 +130,19 @@ def test_bad_line(self):
120130
121131 @skipIf (oslist = lldbplatformutil .getDarwinOSTriples () + ["windows" ])
122132 @skipIf (archs = no_match (["x86_64" , "aarch64" ]))
133+ @skipIf (compiler = no_match (["clang" ]))
123134 def test_bad_line_discontinuous (self ):
124135 """Test that we get an error if attempting to step outside the current
125136 function -- and the function is discontinuous"""
126- self .build (dictionary = self ._build_dict_for_discontinuity ())
127- _ , _ , thread , _ = lldbutil .run_to_source_breakpoint (
128- self , "At the start" , self .main_spec
129- )
137+
138+ try :
139+ self .build (dictionary = self ._build_dict_for_discontinuity ())
140+ _ , _ , thread , _ = lldbutil .run_to_source_breakpoint (
141+ self , "At the start" , self .main_spec
142+ )
143+ except BuildError as ex :
144+ self .skipTest (f"failed to build with linker script." )
145+
130146 self .assertIn (
131147 "step until target not in current function" ,
132148 thread .StepOverUntil (
0 commit comments