Skip to content

Commit 099d52e

Browse files
committed
fixup! register dylib in test
Otherwise executable fails to launch on linux
1 parent ddf62e9 commit 099d52e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

lldb/test/API/lang/cpp/expr-definition-in-dylib/TestExprDefinitionInDylib.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@ def test(self):
1414
"""
1515
self.build()
1616

17-
lldbutil.run_to_source_breakpoint(self, "return", lldb.SBFileSpec("main.cpp"))
17+
target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
18+
self.assertTrue(target, VALID_TARGET)
19+
20+
env = self.registerSharedLibrariesWithTarget(target, ["lib"])
21+
22+
breakpoint = lldbutil.run_break_set_by_file_and_line(
23+
self, "main.cpp", line_number("main.cpp", "return")
24+
)
25+
26+
process = target.LaunchSimple(None, env, self.get_process_working_directory())
27+
28+
self.assertIsNotNone(
29+
lldbutil.get_one_thread_stopped_at_breakpoint_id(self.process(), breakpoint)
30+
)
1831

1932
self.expect_expr("f.method()", result_value="-72", result_type="int")

0 commit comments

Comments
 (0)