Even non-remote targets may need to set the launch environment
((DY)LD_LIBRARY_PATH, specifically) to run successfully.
Also, add an assertion to better detect the case when launching a target
fails and the breakpoint is never hit.
launch_info = target.GetLaunchInfo()
launch_info.SetWorkingDirectory(test.get_process_working_directory())
- if extra_images and lldb.remote_platform:
+ if extra_images:
environ = test.registerSharedLibrariesWithTarget(target, extra_images)
launch_info.SetEnvironmentEntries(environ, True)
test.assertFalse(error.Fail(),
"Process launch failed: %s" % (error.GetCString()))
+ test.assertEqual(process.GetState(), lldb.eStateStopped)
+
# Frame #0 should be at our breakpoint.
threads = get_threads_stopped_at_breakpoint(
process, bkpt)