forked from OSchip/llvm-project
[lldb] Use target.GetLaunchInfo() instead of creating an empty one.
Update tests that were creating an empty LaunchInfo instead of using the one coming from the target. This ensures target properties are honored.
This commit is contained in:
parent
9f24148b21
commit
86aa8e6363
|
@ -41,7 +41,7 @@ class FrameDisassembleTestCase(TestBase):
|
|||
# environment variables, add them using SetArguments or
|
||||
# SetEnvironmentEntries
|
||||
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = target.GetLaunchInfo()
|
||||
process = target.Launch(launch_info, error)
|
||||
self.assertTrue(process, PROCESS_IS_VALID)
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class TestFrameGuessLanguage(TestBase):
|
|||
# environment variables, add them using SetArguments or
|
||||
# SetEnvironmentEntries
|
||||
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = target.GetLaunchInfo()
|
||||
process = target.Launch(launch_info, error)
|
||||
self.assertTrue(process, PROCESS_IS_VALID)
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class TestFrameVar(TestBase):
|
|||
# environment variables, add them using SetArguments or
|
||||
# SetEnvironmentEntries
|
||||
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = target.GetLaunchInfo()
|
||||
process = target.Launch(launch_info, error)
|
||||
self.assertTrue(process, PROCESS_IS_VALID)
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class TestAutoInstallMainExecutable(gdbremote_testcase.GdbRemoteTestCaseBase):
|
|||
|
||||
# Disable the auto install.
|
||||
self.runCmd("settings set target.auto-install-main-executable false")
|
||||
self.expect("settings show target.auto-install-main-executable",
|
||||
self.expect("settings show target.auto-install-main-executable",
|
||||
substrs=["target.auto-install-main-executable (boolean) = false"])
|
||||
|
||||
self.runCmd("platform select %s"%configuration.lldb_platform_name)
|
||||
|
@ -80,7 +80,7 @@ class TestAutoInstallMainExecutable(gdbremote_testcase.GdbRemoteTestCaseBase):
|
|||
target = new_debugger.GetSelectedTarget()
|
||||
breakpoint = target.BreakpointCreateByName("main")
|
||||
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = taget.GetLaunchInfo()
|
||||
error = lldb.SBError()
|
||||
process = target.Launch(launch_info, error)
|
||||
self.assertTrue(process, PROCESS_IS_VALID)
|
||||
|
|
|
@ -56,6 +56,7 @@ class AddressBreakpointTestCase(TestBase):
|
|||
launch_info = lldb.SBLaunchInfo(None)
|
||||
flags = launch_info.GetLaunchFlags()
|
||||
flags &= ~lldb.eLaunchFlagDisableASLR
|
||||
flags &= lldb.eLaunchFlagInheritTCCFromParent
|
||||
launch_info.SetLaunchFlags(flags)
|
||||
|
||||
error = lldb.SBError()
|
||||
|
|
|
@ -46,7 +46,7 @@ class BreakpointAutoContinue(TestBase):
|
|||
|
||||
def launch_it (self, expected_state):
|
||||
error = lldb.SBError()
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = self.target.GetLaunchInfo()
|
||||
launch_info.SetWorkingDirectory(self.get_process_working_directory())
|
||||
|
||||
process = self.target.Launch(launch_info, error)
|
||||
|
|
|
@ -47,7 +47,7 @@ class SendSignalTestCase(TestBase):
|
|||
VALID_BREAKPOINT_LOCATION)
|
||||
|
||||
# Now launch the process, no arguments & do not stop at entry point.
|
||||
launch_info = lldb.SBLaunchInfo([exe])
|
||||
launch_info = target.GetLaunchInfo()
|
||||
launch_info.SetWorkingDirectory(self.get_process_working_directory())
|
||||
|
||||
process_listener = lldb.SBListener("signal_test_listener")
|
||||
|
|
|
@ -31,7 +31,7 @@ class TestTailCallFrameSBAPI(TestBase):
|
|||
VALID_BREAKPOINT)
|
||||
|
||||
error = lldb.SBError()
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = target.GetLaunchInfo()
|
||||
process = target.Launch(launch_info, error)
|
||||
self.assertTrue(process, PROCESS_IS_VALID)
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ class TestArtificialFrameThreadStepOut1(TestBase):
|
|||
VALID_BREAKPOINT)
|
||||
|
||||
error = lldb.SBError()
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = target.GetLaunchInfo()
|
||||
process = target.Launch(launch_info, error)
|
||||
self.assertTrue(process, PROCESS_IS_VALID)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class TestInterruptThreadNames(TestBase):
|
|||
target = self.dbg.CreateTarget(exe)
|
||||
self.assertTrue(target, VALID_TARGET)
|
||||
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = target.GetLaunchInfo()
|
||||
error = lldb.SBError()
|
||||
self.dbg.SetAsync(True)
|
||||
process = target.Launch(launch_info, error)
|
||||
|
|
|
@ -339,7 +339,7 @@ class ProcessAPITestCase(TestBase):
|
|||
self.assertTrue(target, VALID_TARGET)
|
||||
|
||||
# Launch the process and stop at the entry point.
|
||||
launch_info = lldb.SBLaunchInfo(None)
|
||||
launch_info = target.GetLaunchInfo()
|
||||
launch_info.SetWorkingDirectory(self.get_process_working_directory())
|
||||
launch_flags = launch_info.GetLaunchFlags()
|
||||
launch_flags |= lldb.eLaunchFlagStopAtEntry
|
||||
|
|
|
@ -135,7 +135,7 @@ class ProcessIOTestCase(TestBase):
|
|||
def create_target(self):
|
||||
'''Create the target and launch info that will be used by all tests'''
|
||||
self.target = self.dbg.CreateTarget(self.exe)
|
||||
self.launch_info = lldb.SBLaunchInfo([self.exe])
|
||||
self.launch_info = self.target.GetLaunchInfo()
|
||||
self.launch_info.SetWorkingDirectory(
|
||||
self.get_process_working_directory())
|
||||
|
||||
|
|
Loading…
Reference in New Issue