1
- import lldb
2
1
from lldbsuite .test .decorators import *
3
2
from lldbsuite .test .lldbtest import *
4
3
from lldbsuite .test import lldbutil
4
+ from lldbsuite .test_event .build_exception import BuildError
5
5
6
6
7
7
class TestStepUntilAPI (TestBase ):
@@ -74,15 +74,20 @@ def test_hitting(self):
74
74
75
75
@skipIf (oslist = lldbplatformutil .getDarwinOSTriples () + ["windows" ])
76
76
@skipIf (archs = no_match (["x86_64" , "aarch64" ]))
77
+ @skipIf (compiler = no_match (["clang" ]))
77
78
def test_hitting_discontinuous (self ):
78
79
"""Test SBThread.StepOverUntil - targeting a line and hitting it -- with
79
80
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
+
86
91
self ._assertDiscontinuity ()
87
92
88
93
def test_missing (self ):
@@ -93,15 +98,20 @@ def test_missing(self):
93
98
94
99
@skipIf (oslist = lldbplatformutil .getDarwinOSTriples () + ["windows" ])
95
100
@skipIf (archs = no_match (["x86_64" , "aarch64" ]))
101
+ @skipIf (compiler = no_match (["clang" ]))
96
102
def test_missing_discontinuous (self ):
97
103
"""Test SBThread.StepOverUntil - targeting a line and missing it by
98
104
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
+
105
115
self ._assertDiscontinuity ()
106
116
107
117
def test_bad_line (self ):
@@ -120,13 +130,19 @@ def test_bad_line(self):
120
130
121
131
@skipIf (oslist = lldbplatformutil .getDarwinOSTriples () + ["windows" ])
122
132
@skipIf (archs = no_match (["x86_64" , "aarch64" ]))
133
+ @skipIf (compiler = no_match (["clang" ]))
123
134
def test_bad_line_discontinuous (self ):
124
135
"""Test that we get an error if attempting to step outside the current
125
136
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
+
130
146
self .assertIn (
131
147
"step until target not in current function" ,
132
148
thread .StepOverUntil (
0 commit comments