Skip to content

Commit fbad602

Browse files
committed
Fix TestSwiftDynamicTypeResolutionImportConflict launching test twice
(cherry picked from commit ff35f98)
1 parent b2a5124 commit fbad602

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lldb/test/API/lang/swift/clangimporter/dynamic_type_resolution_import_conflict/TestSwiftDynamicTypeResolutionImportConflict.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,19 @@ def test(self):
4646
self.runCmd('settings set symbols.clang-modules-cache-path "%s"'
4747
% mod_cache)
4848
self.build()
49-
lldbutil.run_to_source_breakpoint(self, "break here",
49+
target, _, _, _ = lldbutil.run_to_source_breakpoint(self, "break here",
5050
lldb.SBFileSpec('main.swift'),
5151
extra_images=['Dylib', 'Conflict'])
5252
# Destroy the scratch context with a dynamic type lookup.
5353
self.expect("target var -d run-target -- foofoo",
5454
substrs=['(Conflict.C) foofoo'])
5555
self.expect("target var -- foofoo",
5656
substrs=['(Conflict.C) foofoo'])
57-
lldbutil.run_to_source_breakpoint(self, "break here",
58-
lldb.SBFileSpec('Dylib.swift'),
59-
extra_images=['Dylib', 'Conflict'])
57+
dylib_breakpoint = target.BreakpointCreateBySourceRegex(
58+
'break here', lldb.SBFileSpec('Dylib.swift'))
59+
self.assertGreater(dylib_breakpoint.GetNumLocations(), 0)
60+
61+
self.expect("continue")
6062
self.expect("bt", substrs=['Dylib.swift'])
6163
self.expect("fr v -d no-dynamic-values -- input",
6264
substrs=['(Dylib.LibraryProtocol) input'])

0 commit comments

Comments
 (0)