diff options
Diffstat (limited to 'lldb/test')
81 files changed, 108 insertions, 99 deletions
diff --git a/lldb/test/api/multithreaded/listener_test.cpp b/lldb/test/api/multithreaded/listener_test.cpp index 6697428bd1e..b20868ff94f 100644 --- a/lldb/test/api/multithreaded/listener_test.cpp +++ b/lldb/test/api/multithreaded/listener_test.cpp @@ -49,7 +49,7 @@ void test(SBDebugger &dbg, std::vector<string> args) { throw Exception("Error launching process."); /* FIXME: the approach below deadlocks - SBProcess process = target.LaunchSimple(0, 0, working_dir.get()); + SBProcess process = target.LaunchSimple (0, 0, working_dir.get()); // get debugger listener (which is attached to process by default) g_listener = dbg.GetListener(); diff --git a/lldb/test/api/multithreaded/test_breakpoint_callback.cpp b/lldb/test/api/multithreaded/test_breakpoint_callback.cpp index a6f256075d2..0cc1b6ddba6 100644 --- a/lldb/test/api/multithreaded/test_breakpoint_callback.cpp +++ b/lldb/test/api/multithreaded/test_breakpoint_callback.cpp @@ -37,7 +37,7 @@ void test(SBDebugger &dbg, vector<string> args) { breakpoint.SetCallback(BPCallback, 0); std::unique_ptr<char> working_dir(get_working_dir()); - SBProcess process = target.LaunchSimple(0, 0, working_dir.get()); + SBProcess process = target.LaunchSimple (0, 0, working_dir.get()); { unique_lock<mutex> lock(g_mutex); diff --git a/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py b/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py index def31a1e041..771169afe76 100644 --- a/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py +++ b/lldb/test/expression_command/call-restarts/TestCallThatRestarts.py @@ -56,7 +56,7 @@ class ExprCommandWithTimeoutsTestCase(TestBase): self.assertTrue(breakpoint.GetNumLocations() > 0, VALID_BREAKPOINT) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/expression_command/call-throws/TestCallThatThrows.py b/lldb/test/expression_command/call-throws/TestCallThatThrows.py index d2ccb076a93..65380cc02db 100644 --- a/lldb/test/expression_command/call-throws/TestCallThatThrows.py +++ b/lldb/test/expression_command/call-throws/TestCallThatThrows.py @@ -51,7 +51,7 @@ class ExprCommandWithThrowTestCase(TestBase): self.assertTrue(breakpoint.GetNumLocations() > 0, VALID_BREAKPOINT) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/expression_command/issue_11588/Test11588.py b/lldb/test/expression_command/issue_11588/Test11588.py index 81967d967d0..00461532667 100644 --- a/lldb/test/expression_command/issue_11588/Test11588.py +++ b/lldb/test/expression_command/issue_11588/Test11588.py @@ -34,7 +34,7 @@ class Issue11581TestCase(TestBase): breakpoint = target.BreakpointCreateBySourceRegex('Set breakpoint here.',lldb.SBFileSpec ("main.cpp", False)) - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue (process, "Created a process.") self.assertTrue (process.GetState() == lldb.eStateStopped, "Stopped it too.") diff --git a/lldb/test/expression_command/test/TestExprs.py b/lldb/test/expression_command/test/TestExprs.py index 01fec1e36e7..0011f7ad017 100644 --- a/lldb/test/expression_command/test/TestExprs.py +++ b/lldb/test/expression_command/test/TestExprs.py @@ -113,7 +113,7 @@ class BasicExprCommandsTestCase(TestBase): # Launch the process, and do not stop at the entry point. # Pass 'X Y Z' as the args, which makes argc == 4. - process = target.LaunchSimple(['X', 'Y', 'Z'], None, os.getcwd()) + process = target.LaunchSimple (['X', 'Y', 'Z'], None, self.get_process_working_directory()) if not process: self.fail("SBTarget.LaunchProcess() failed") diff --git a/lldb/test/expression_command/timeout/TestCallWithTimeout.py b/lldb/test/expression_command/timeout/TestCallWithTimeout.py index 4bb55c005da..b7e20b62526 100644 --- a/lldb/test/expression_command/timeout/TestCallWithTimeout.py +++ b/lldb/test/expression_command/timeout/TestCallWithTimeout.py @@ -46,7 +46,7 @@ class ExprCommandWithTimeoutsTestCase(TestBase): self.runCmd("breakpoint list") # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py b/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py index 95a515efd10..50f86f81af3 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py @@ -173,7 +173,7 @@ class BreakpointConditionsTestCase(TestBase): startstr = 'val == 3') # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Frame #0 should be on self.line1 and the break condition should hold. diff --git a/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py b/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py index c673a3b690a..506ac167f4d 100644 --- a/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py +++ b/lldb/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py @@ -126,7 +126,7 @@ class BreakpointIgnoreCountTestCase(TestBase): "SetIgnoreCount() works correctly") # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Frame#0 should be on main.c:37, frame#1 should be on main.c:25, and diff --git a/lldb/test/functionalities/conditional_break/TestConditionalBreak.py b/lldb/test/functionalities/conditional_break/TestConditionalBreak.py index d6644323bdd..200faa0f6ec 100644 --- a/lldb/test/functionalities/conditional_break/TestConditionalBreak.py +++ b/lldb/test/functionalities/conditional_break/TestConditionalBreak.py @@ -56,7 +56,7 @@ class ConditionalBreakTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/functionalities/exec/TestExec.py b/lldb/test/functionalities/exec/TestExec.py index 9d5ad1b3279..3501fd22f06 100644 --- a/lldb/test/functionalities/exec/TestExec.py +++ b/lldb/test/functionalities/exec/TestExec.py @@ -60,7 +60,7 @@ class ExecTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Launch the process - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) for i in range(6): diff --git a/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py b/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py index 5862a347deb..a1cc8435d99 100644 --- a/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py +++ b/lldb/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py @@ -53,7 +53,7 @@ class ExprDoesntDeadlockTestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Frame #0 should be on self.line1 and the break condition should hold. diff --git a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py index 9c6dd6f21ab..c4baf5d9f2f 100644 --- a/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py +++ b/lldb/test/functionalities/inferior-assert/TestInferiorAssert.py @@ -119,7 +119,7 @@ class AssertingInferiorTestCase(TestBase): # Now launch the process, and do not stop at entry point. # Both argv and envp are null. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if process.GetState() != lldb.eStateStopped: self.fail("Process should be in the 'stopped' state, " @@ -154,7 +154,7 @@ class AssertingInferiorTestCase(TestBase): self.assertTrue(target, VALID_TARGET) # Launch the process, and do not stop at the entry point. - target.LaunchSimple(None, None, os.getcwd()) + target.LaunchSimple (None, None, self.get_process_working_directory()) self.check_stop_reason() process = target.GetProcess() @@ -200,7 +200,7 @@ class AssertingInferiorTestCase(TestBase): self.assertTrue(target, VALID_TARGET) # Launch the process, and do not stop at the entry point. - target.LaunchSimple(None, None, os.getcwd()) + target.LaunchSimple (None, None, self.get_process_working_directory()) self.check_stop_reason() process = target.GetProcess() @@ -222,7 +222,7 @@ class AssertingInferiorTestCase(TestBase): # Launch the process, and do not stop at the entry point. self.set_breakpoint(self.line) - target.LaunchSimple(None, None, os.getcwd()) + target.LaunchSimple (None, None, self.get_process_working_directory()) self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT, substrs = ['main.c:%d' % self.line, diff --git a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py index af0abae467d..3050e54a136 100644 --- a/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py +++ b/lldb/test/functionalities/inferior-crashing/TestInferiorCrashing.py @@ -129,7 +129,7 @@ class CrashingInferiorTestCase(TestBase): # Now launch the process, and do not stop at entry point. # Both argv and envp are null. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if process.GetState() != lldb.eStateStopped: self.fail("Process should be in the 'stopped' state, " diff --git a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py index f79e99d4766..d57cc7e0b38 100644 --- a/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py +++ b/lldb/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py @@ -133,7 +133,7 @@ class CrashingRecursiveInferiorTestCase(TestBase): # Now launch the process, and do not stop at entry point. # Both argv and envp are null. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if process.GetState() != lldb.eStateStopped: self.fail("Process should be in the 'stopped' state, " diff --git a/lldb/test/functionalities/inline-stepping/TestInlineStepping.py b/lldb/test/functionalities/inline-stepping/TestInlineStepping.py index a13331bf61e..eb192864e7b 100644 --- a/lldb/test/functionalities/inline-stepping/TestInlineStepping.py +++ b/lldb/test/functionalities/inline-stepping/TestInlineStepping.py @@ -122,7 +122,7 @@ class TestInlineStepping(TestBase): self.assertTrue(break_1_in_main, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - self.process = target.LaunchSimple (None, None, os.getcwd()) + self.process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(self.process, PROCESS_IS_VALID) @@ -218,7 +218,7 @@ class TestInlineStepping(TestBase): self.assertTrue(break_1_in_main, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - self.process = target.LaunchSimple (None, None, os.getcwd()) + self.process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(self.process, PROCESS_IS_VALID) diff --git a/lldb/test/functionalities/register/TestRegisters.py b/lldb/test/functionalities/register/TestRegisters.py index 42a81d6e680..dfd4e7a48d5 100644 --- a/lldb/test/functionalities/register/TestRegisters.py +++ b/lldb/test/functionalities/register/TestRegisters.py @@ -155,7 +155,7 @@ class RegisterCommandsTestCase(TestBase): lldbutil.run_break_set_by_symbol (self, "main", num_expected_locations=-1) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) process = target.GetProcess() self.assertTrue(process.GetState() == lldb.eStateStopped, diff --git a/lldb/test/functionalities/return-value/TestReturnValue.py b/lldb/test/functionalities/return-value/TestReturnValue.py index ff138f2a245..6fe9781ff7f 100644 --- a/lldb/test/functionalities/return-value/TestReturnValue.py +++ b/lldb/test/functionalities/return-value/TestReturnValue.py @@ -95,7 +95,7 @@ class ReturnValueTestCase(TestBase): self.assertTrue(inner_sint_bkpt, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - self.process = self.target.LaunchSimple(None, None, os.getcwd()) + self.process = self.target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(self.process, PROCESS_IS_VALID) diff --git a/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py b/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py index 094aa5e9e74..119770a72bc 100644 --- a/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py +++ b/lldb/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py @@ -60,7 +60,7 @@ class TestWatchpointEvents (TestBase): self.assertTrue(break_in_main, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/c/anonymous/TestAnonymous.py b/lldb/test/lang/c/anonymous/TestAnonymous.py index 7cfb364061d..93f232a36bb 100644 --- a/lldb/test/lang/c/anonymous/TestAnonymous.py +++ b/lldb/test/lang/c/anonymous/TestAnonymous.py @@ -162,7 +162,7 @@ class AnonymousTestCase(TestBase): break_in_main = target.BreakpointCreateBySourceRegex ('// Set breakpoint 2 here.', lldb.SBFileSpec("main.c")) self.assertTrue(break_in_main, VALID_BREAKPOINT) - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue (process, PROCESS_IS_VALID) threads = lldbutil.get_threads_stopped_at_breakpoint (process, break_in_main) diff --git a/lldb/test/lang/c/array_types/TestArrayTypes.py b/lldb/test/lang/c/array_types/TestArrayTypes.py index 8bb95cbc8a3..de70a11e2d9 100644 --- a/lldb/test/lang/c/array_types/TestArrayTypes.py +++ b/lldb/test/lang/c/array_types/TestArrayTypes.py @@ -112,7 +112,7 @@ class ArrayTypesTestCase(TestBase): substrs = ["resolved = 1"]) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Sanity check the print representation of process. diff --git a/lldb/test/lang/c/bitfields/TestBitfields.py b/lldb/test/lang/c/bitfields/TestBitfields.py index c01625249d3..0b5c51001af 100644 --- a/lldb/test/lang/c/bitfields/TestBitfields.py +++ b/lldb/test/lang/c/bitfields/TestBitfields.py @@ -133,7 +133,7 @@ class BitfieldsTestCase(TestBase): breakpoint = target.BreakpointCreateByLocation("main.c", self.line) self.assertTrue(breakpoint, VALID_BREAKPOINT) - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # The stop reason of the thread should be breakpoint. diff --git a/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py b/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py index 81a937a6bc6..0651ddcb064 100644 --- a/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py +++ b/lldb/test/lang/c/stepping/TestStepAndBreakpoints.py @@ -64,7 +64,7 @@ class TestCStepping(TestBase): breakpoints_to_disable.append (break_in_c) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/c/struct_types/TestStructTypes.py b/lldb/test/lang/c/struct_types/TestStructTypes.py index 1ec0ec7c6a9..3e25dffc914 100644 --- a/lldb/test/lang/c/struct_types/TestStructTypes.py +++ b/lldb/test/lang/c/struct_types/TestStructTypes.py @@ -55,7 +55,7 @@ class StructTypesTestCase(TestBase): lldbutil.run_break_set_by_file_and_line (self, "main.c", self.return_line, num_expected_locations=1, loc_exact=True) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.Launch() failed") diff --git a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py index 445c1dd9c9e..cf4d98f6fa2 100644 --- a/lldb/test/lang/cpp/char1632_t/TestChar1632T.py +++ b/lldb/test/lang/cpp/char1632_t/TestChar1632T.py @@ -46,7 +46,7 @@ class Char1632TestCase(TestBase): lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.Launch() failed") diff --git a/lldb/test/lang/cpp/class_static/TestStaticVariables.py b/lldb/test/lang/cpp/class_static/TestStaticVariables.py index 6ecefd379e9..16a280504e6 100644 --- a/lldb/test/lang/cpp/class_static/TestStaticVariables.py +++ b/lldb/test/lang/cpp/class_static/TestStaticVariables.py @@ -88,7 +88,7 @@ class StaticVariableTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # The stop reason of the thread should be breakpoint. diff --git a/lldb/test/lang/cpp/class_types/TestClassTypes.py b/lldb/test/lang/cpp/class_types/TestClassTypes.py index b41ca399af2..e4670931775 100644 --- a/lldb/test/lang/cpp/class_types/TestClassTypes.py +++ b/lldb/test/lang/cpp/class_types/TestClassTypes.py @@ -123,7 +123,7 @@ class ClassTypesTestCase(TestBase): str(self.line)]) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.Launch() failed") diff --git a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py index b2afaa57a13..df7c46e4545 100644 --- a/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py +++ b/lldb/test/lang/cpp/dynamic-value/TestCppValueCast.py @@ -76,7 +76,7 @@ class CppValueCastTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) diff --git a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py index b0698d80070..dfd6127b166 100644 --- a/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py +++ b/lldb/test/lang/cpp/dynamic-value/TestDynamicValue.py @@ -140,7 +140,7 @@ class DynamicValueTestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) diff --git a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py index 122ff94f5b0..bb81d6d0d35 100644 --- a/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py +++ b/lldb/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py @@ -44,7 +44,7 @@ class CPPBreakpointTestCase(TestBase): self.assertTrue (exception_bkpt, "Made an exception breakpoint") # Now run, and make sure we hit our breakpoint: - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue (process, "Got a valid process") stopped_threads = [] diff --git a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py index faa04881945..9cdd9ab4ad8 100644 --- a/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py +++ b/lldb/test/lang/cpp/rdar12991846/TestRdar12991846.py @@ -63,7 +63,7 @@ class Rdar12991846TestCase(TestBase): lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.Launch() failed") diff --git a/lldb/test/lang/cpp/stl/TestSTL.py b/lldb/test/lang/cpp/stl/TestSTL.py index ffb02e2e654..309d169eca1 100644 --- a/lldb/test/lang/cpp/stl/TestSTL.py +++ b/lldb/test/lang/cpp/stl/TestSTL.py @@ -106,7 +106,7 @@ class STLTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Get Frame #0. diff --git a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py index 3d286d89175..e6dc376093c 100644 --- a/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py +++ b/lldb/test/lang/cpp/wchar_t/TestCxxWCharT.py @@ -45,7 +45,7 @@ class CxxWCharTTestCase(TestBase): lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.Launch() failed") diff --git a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py index 40d7bfc3219..dfb6431d79c 100644 --- a/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py +++ b/lldb/test/lang/objc/blocks/TestObjCIvarsInBlocks.py @@ -51,7 +51,7 @@ class TestObjCIvarsInBlocks(TestBase): breakpoint_two = target.BreakpointCreateBySourceRegex ('// Break here inside the class method block.', self.class_source_file_spec) self.assertTrue(breakpoint, VALID_BREAKPOINT) - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue (process, "Created a process.") self.assertTrue (process.GetState() == lldb.eStateStopped, "Stopped it too.") diff --git a/lldb/test/lang/objc/foundation/TestObjCMethods.py b/lldb/test/lang/objc/foundation/TestObjCMethods.py index 67c96c1c35d..ed458f8864c 100644 --- a/lldb/test/lang/objc/foundation/TestObjCMethods.py +++ b/lldb/test/lang/objc/foundation/TestObjCMethods.py @@ -219,7 +219,7 @@ class FoundationTestCase(TestBase): self.assertTrue(break1, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py index 09a03d4df96..e2409584600 100644 --- a/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py +++ b/lldb/test/lang/objc/foundation/TestObjectDescriptionAPI.py @@ -53,7 +53,7 @@ class ObjectDescriptionAPITestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Make sure we hit our breakpoint: thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint) diff --git a/lldb/test/lang/objc/foundation/TestSymbolTable.py b/lldb/test/lang/objc/foundation/TestSymbolTable.py index 28b5f73fa7f..77bb538ee05 100644 --- a/lldb/test/lang/objc/foundation/TestSymbolTable.py +++ b/lldb/test/lang/objc/foundation/TestSymbolTable.py @@ -47,7 +47,7 @@ class FoundationSymtabTestCase(TestBase): self.assertTrue(target, VALID_TARGET) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # # Exercise Python APIs to access the symbol table entries. diff --git a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py index 6aca65b781f..2dd47143744 100644 --- a/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py +++ b/lldb/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py @@ -52,7 +52,7 @@ class ObjCDynamicValueTestCase(TestBase): # Set up our breakpoints: target.BreakpointCreateByLocation('main.m', self.line) - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) diff --git a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py index b43ad7af907..6082ac88a0a 100644 --- a/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py +++ b/lldb/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py @@ -45,7 +45,7 @@ class TestObjCBuiltinTypes(TestBase): self.assertTrue(bpt, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py index 28659ffd813..b6739cfff06 100644 --- a/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py +++ b/lldb/test/lang/objc/objc-checker/TestObjCCheckers.py @@ -58,7 +58,7 @@ class ObjCCheckerTestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) diff --git a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py index 9fc272133d7..d230391e024 100644 --- a/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py +++ b/lldb/test/lang/objc/objc-class-method/TestObjCClassMethod.py @@ -48,7 +48,7 @@ class TestObjCClassMethod(TestBase): self.assertTrue(bpt, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py index e679ca27b07..2dd054c0f25 100644 --- a/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py +++ b/lldb/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py @@ -76,7 +76,7 @@ class ObjCDynamicValueTestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) diff --git a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py index 1df069f00df..601dddea35d 100644 --- a/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py +++ b/lldb/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py @@ -43,7 +43,7 @@ class TestObjCIvarOffsets(TestBase): breakpoint = target.BreakpointCreateByLocation(self.main_source, self.stop_line) self.assertTrue(breakpoint, VALID_BREAKPOINT) - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue (process, "Created a process.") self.assertTrue (process.GetState() == lldb.eStateStopped, "Stopped it too.") diff --git a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py index 3a116bbc12a..47e2802137c 100644 --- a/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py +++ b/lldb/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py @@ -35,7 +35,7 @@ class TestObjCIvarStripped(TestBase): breakpoint = target.BreakpointCreateByLocation(self.main_source, self.stop_line) self.assertTrue(breakpoint, VALID_BREAKPOINT) - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue (process, "Created a process.") self.assertTrue (process.GetState() == lldb.eStateStopped, "Stopped it too.") diff --git a/lldb/test/lang/objc/objc-property/TestObjCProperty.py b/lldb/test/lang/objc/objc-property/TestObjCProperty.py index 2a2bd014cea..636d7d7f709 100644 --- a/lldb/test/lang/objc/objc-property/TestObjCProperty.py +++ b/lldb/test/lang/objc/objc-property/TestObjCProperty.py @@ -57,7 +57,7 @@ class ObjCPropertyTestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) diff --git a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py index c14432c879f..5416476031a 100644 --- a/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py +++ b/lldb/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py @@ -40,7 +40,7 @@ class TestObjCStaticMethodStripped(TestBase): self.assertTrue(bpt, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py index a89863143fc..dc78b888a51 100644 --- a/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py +++ b/lldb/test/lang/objc/objc-static-method/TestObjCStaticMethod.py @@ -47,7 +47,7 @@ class TestObjCStaticMethod(TestBase): self.assertTrue(bpt, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py index 8bee8c05de2..84f7a0d7b9a 100644 --- a/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py +++ b/lldb/test/lang/objc/objc-stepping/TestObjCStepping.py @@ -79,7 +79,7 @@ class TestObjCStepping(TestBase): self.assertTrue(break_step_nil, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py index 8490d1c73b1..8ea9c1afe46 100644 --- a/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py +++ b/lldb/test/lang/objc/objc-struct-return/TestObjCStructReturn.py @@ -44,7 +44,7 @@ class TestObjCClassMethod(TestBase): self.assertTrue(bpt, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/objc/objc-super/TestObjCSuper.py b/lldb/test/lang/objc/objc-super/TestObjCSuper.py index 15b5218f28c..a9db9b5b911 100644 --- a/lldb/test/lang/objc/objc-super/TestObjCSuper.py +++ b/lldb/test/lang/objc/objc-super/TestObjCSuper.py @@ -46,7 +46,7 @@ class TestObjCSuperMethod(TestBase): self.assertTrue(bpt, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple (None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/lang/objc/print-obj/TestPrintObj.py b/lldb/test/lang/objc/print-obj/TestPrintObj.py index acd4f7d9b29..88d8188cf21 100644 --- a/lldb/test/lang/objc/print-obj/TestPrintObj.py +++ b/lldb/test/lang/objc/print-obj/TestPrintObj.py @@ -55,7 +55,7 @@ class PrintObjTestCase(TestBase): self.runCmd("breakpoint list") # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.runCmd("thread backtrace all") diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index 1cf528df480..9b5270b5cd3 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -1692,7 +1692,7 @@ class TestBase(Base): self.runCmd("file %s" % arg) target = self.dbg.GetSelectedTarget() # - # SBTarget.LaunchSimple() currently not working for remote platform? + # SBtarget.LaunchSimple () currently not working for remote platform? # johnny @ 04/23/2012 # def DecoratedLaunchSimple(argv, envp, wd): @@ -1753,6 +1753,15 @@ class TestBase(Base): raise Exception('Invalid debugger instance') return self.dbg.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame() + def get_process_working_directory(self): + '''Get the working directory that should be used when launching processes for local or remote processes.''' + if lldb.remote_platform: + # Remote tests set the platform working directory up in TestBase.setUp() + return lldb.remote_platform.GetWorkingDirectory() + else: + # local tests change directory into each test subdirectory + return os.getcwd() + def tearDown(self): #import traceback #traceback.print_stack() diff --git a/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py b/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py index 23affe37b96..e74c37f7f3c 100644 --- a/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py +++ b/lldb/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py @@ -28,7 +28,7 @@ class AddDsymMidExecutionCommandCase(TestBase): self.assertTrue(main_bp, VALID_BREAKPOINT) self.runCmd("settings set target.disable-aslr false") - self.process = self.target.LaunchSimple(None, None, os.getcwd()) + self.process = self.target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(self.process, PROCESS_IS_VALID) # The stop reason of the thread should be breakpoint. diff --git a/lldb/test/macosx/universal/TestUniversal.py b/lldb/test/macosx/universal/TestUniversal.py index fd1683031c5..1a83104ec05 100644 --- a/lldb/test/macosx/universal/TestUniversal.py +++ b/lldb/test/macosx/universal/TestUniversal.py @@ -32,7 +32,7 @@ class UniversalTestCase(TestBase): self.assertTrue(target, VALID_TARGET) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) @unittest2.skipUnless(sys.platform.startswith("darwin") and os.uname()[4] in ['i386', 'x86_64'], diff --git a/lldb/test/python_api/event/TestEvents.py b/lldb/test/python_api/event/TestEvents.py index 64e95ea3c3c..bb2636c71d8 100644 --- a/lldb/test/python_api/event/TestEvents.py +++ b/lldb/test/python_api/event/TestEvents.py @@ -75,7 +75,7 @@ class EventAPITestCase(TestBase): breakpoint = target.BreakpointCreateByName('c', 'a.out') # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) @@ -213,7 +213,7 @@ class EventAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process.GetState() == lldb.eStateStopped, PROCESS_STOPPED) diff --git a/lldb/test/python_api/frame/TestFrames.py b/lldb/test/python_api/frame/TestFrames.py index 050c51a524a..c820e1b90c9 100644 --- a/lldb/test/python_api/frame/TestFrames.py +++ b/lldb/test/python_api/frame/TestFrames.py @@ -56,7 +56,7 @@ class FrameAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) process = target.GetProcess() self.assertTrue(process.GetState() == lldb.eStateStopped, @@ -142,7 +142,7 @@ class FrameAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) process = target.GetProcess() self.assertTrue(process.GetState() == lldb.eStateStopped, @@ -179,7 +179,7 @@ class FrameAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) process = target.GetProcess() self.assertTrue(process.GetState() == lldb.eStateStopped, diff --git a/lldb/test/python_api/frame/inlines/TestInlinedFrame.py b/lldb/test/python_api/frame/inlines/TestInlinedFrame.py index f7d1517f7d5..25e9b350e27 100644 --- a/lldb/test/python_api/frame/inlines/TestInlinedFrame.py +++ b/lldb/test/python_api/frame/inlines/TestInlinedFrame.py @@ -52,7 +52,7 @@ class InlinedFrameAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) process = target.GetProcess() self.assertTrue(process.GetState() == lldb.eStateStopped, diff --git a/lldb/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/test/python_api/function_symbol/TestDisasmAPI.py index 14ff0058bf9..6ec69ab6e70 100644 --- a/lldb/test/python_api/function_symbol/TestDisasmAPI.py +++ b/lldb/test/python_api/function_symbol/TestDisasmAPI.py @@ -55,7 +55,7 @@ class DisasmAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Frame #0 should be on self.line1. diff --git a/lldb/test/python_api/function_symbol/TestSymbolAPI.py b/lldb/test/python_api/function_symbol/TestSymbolAPI.py index 564a60f1951..dfb8fad23cb 100644 --- a/lldb/test/python_api/function_symbol/TestSymbolAPI.py +++ b/lldb/test/python_api/function_symbol/TestSymbolAPI.py @@ -55,7 +55,7 @@ class SymbolAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Frame #0 should be on self.line1. diff --git a/lldb/test/python_api/hello_world/TestHelloWorld.py b/lldb/test/python_api/hello_world/TestHelloWorld.py index 088477b79d8..58250a5ad85 100644 --- a/lldb/test/python_api/hello_world/TestHelloWorld.py +++ b/lldb/test/python_api/hello_world/TestHelloWorld.py @@ -117,7 +117,7 @@ class HelloWorldTestCase(TestBase): # rdar://problem/8364687 # SBTarget.Launch() issue (or is there some race condition)? - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # The following isn't needed anymore, rdar://8364687 is fixed. # # Apply some dances after LaunchProcess() in order to break at "main". diff --git a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py index 2b7f341b3b4..22db4a4be36 100644 --- a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py +++ b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py @@ -34,7 +34,7 @@ class FrameUtilsTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.LaunchProcess() failed") diff --git a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py index 8983252a414..4d32d6d997d 100644 --- a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py +++ b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py @@ -47,7 +47,7 @@ class LLDBIteratorTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.LaunchProcess() failed") @@ -107,7 +107,7 @@ class LLDBIteratorTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.LaunchProcess() failed") diff --git a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py index 2f6de65e8c4..63016251240 100644 --- a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py +++ b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py @@ -36,7 +36,7 @@ class RegistersIteratorTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if not process: self.fail("SBTarget.LaunchProcess() failed") diff --git a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py index d845c7903bc..c04e9c08845 100644 --- a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py +++ b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py @@ -36,7 +36,7 @@ class ThreadsStackTracesTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(["abc", "xyz"], None, os.getcwd()) + process = target.LaunchSimple (["abc", "xyz"], None, self.get_process_working_directory()) if not process: self.fail("SBTarget.LaunchProcess() failed") diff --git a/lldb/test/python_api/objc_type/TestObjCType.py b/lldb/test/python_api/objc_type/TestObjCType.py index ce31076d611..ff26ae86e64 100644 --- a/lldb/test/python_api/objc_type/TestObjCType.py +++ b/lldb/test/python_api/objc_type/TestObjCType.py @@ -46,7 +46,7 @@ class ObjCSBTypeTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/python_api/process/TestProcessAPI.py b/lldb/test/python_api/process/TestProcessAPI.py index 245c735e41b..6ce4d0b7852 100644 --- a/lldb/test/python_api/process/TestProcessAPI.py +++ b/lldb/test/python_api/process/TestProcessAPI.py @@ -86,7 +86,7 @@ class ProcessAPITestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint") @@ -167,7 +167,7 @@ class ProcessAPITestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint") @@ -217,7 +217,7 @@ class ProcessAPITestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint") @@ -302,7 +302,7 @@ class ProcessAPITestCase(TestBase): self.assertTrue(target, VALID_TARGET) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if self.TraceOn(): print "process state:", state_type_to_str(process.GetState()) @@ -324,7 +324,7 @@ class ProcessAPITestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) error = lldb.SBError(); num = process.GetNumSupportedHardwareWatchpoints(error) diff --git a/lldb/test/python_api/process/io/TestProcessIO.py b/lldb/test/python_api/process/io/TestProcessIO.py index 7352a8e9d35..9a2d2f8dd05 100644 --- a/lldb/test/python_api/process/io/TestProcessIO.py +++ b/lldb/test/python_api/process/io/TestProcessIO.py @@ -38,7 +38,7 @@ class ProcessIOTestCase(TestBase): # Perform synchronous interaction with the debugger. self.setAsync(True) - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) if self.TraceOn(): print "process launched." diff --git a/lldb/test/python_api/symbol-context/TestSymbolContext.py b/lldb/test/python_api/symbol-context/TestSymbolContext.py index d7574ea20d1..88fc71546aa 100644 --- a/lldb/test/python_api/symbol-context/TestSymbolContext.py +++ b/lldb/test/python_api/symbol-context/TestSymbolContext.py @@ -49,7 +49,7 @@ class SymbolContextAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Frame #0 should be on self.line. diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py index 5516ee667ec..b385edc2c21 100644 --- a/lldb/test/python_api/target/TestTargetAPI.py +++ b/lldb/test/python_api/target/TestTargetAPI.py @@ -128,7 +128,7 @@ class TargetAPITestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Make sure we hit our breakpoint: thread_list = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint) @@ -256,7 +256,7 @@ class TargetAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Frame #0 should be on self.line1. diff --git a/lldb/test/python_api/thread/TestThreadAPI.py b/lldb/test/python_api/thread/TestThreadAPI.py index 7cb97cd524a..a04def93a4c 100644 --- a/lldb/test/python_api/thread/TestThreadAPI.py +++ b/lldb/test/python_api/thread/TestThreadAPI.py @@ -131,7 +131,7 @@ class ThreadAPITestCase(TestBase): self.runCmd("breakpoint list") # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint") @@ -153,7 +153,7 @@ class ThreadAPITestCase(TestBase): #self.runCmd("breakpoint list") # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint") @@ -178,7 +178,7 @@ class ThreadAPITestCase(TestBase): self.runCmd("breakpoint list") # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) while True: thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint) @@ -211,7 +211,7 @@ class ThreadAPITestCase(TestBase): self.runCmd("breakpoint list") # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) @@ -252,7 +252,7 @@ class ThreadAPITestCase(TestBase): self.runCmd("breakpoint list") # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) diff --git a/lldb/test/python_api/type/TestTypeList.py b/lldb/test/python_api/type/TestTypeList.py index ce0a1664d34..39f4a29d3a7 100644 --- a/lldb/test/python_api/type/TestTypeList.py +++ b/lldb/test/python_api/type/TestTypeList.py @@ -53,7 +53,7 @@ class TypeAndTypeListTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Get Frame #0. diff --git a/lldb/test/python_api/value/TestValueAPI.py b/lldb/test/python_api/value/TestValueAPI.py index 024088836a7..a170692468d 100644 --- a/lldb/test/python_api/value/TestValueAPI.py +++ b/lldb/test/python_api/value/TestValueAPI.py @@ -52,7 +52,7 @@ class ValueAPITestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Get Frame #0. diff --git a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py index b716335df71..32f74472fa5 100644 --- a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py +++ b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py @@ -63,7 +63,7 @@ class ChangeValueAPITestCase(TestBase): self.assertTrue(end_breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Get Frame #0. diff --git a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py index c20cc319537..68905f3ec4a 100644 --- a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py +++ b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py @@ -53,7 +53,7 @@ class ValueAsLinkedListTestCase(TestBase): self.assertTrue(breakpoint, VALID_BREAKPOINT) # Now launch the process, and do not stop at entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) self.assertTrue(process, PROCESS_IS_VALID) # Get Frame #0. diff --git a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py index 37a9e552737..de2bd0432c0 100644 --- a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py +++ b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py @@ -51,7 +51,7 @@ class SetWatchpointAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py index b79ef255186..a6ee56c2ee3 100644 --- a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py +++ b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py @@ -51,7 +51,7 @@ class WatchpointIgnoreCountTestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/test/python_api/watchpoint/TestWatchpointIter.py index 8efa10b914b..af6d53cdef0 100644 --- a/lldb/test/python_api/watchpoint/TestWatchpointIter.py +++ b/lldb/test/python_api/watchpoint/TestWatchpointIter.py @@ -51,7 +51,7 @@ class WatchpointIteratorTestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() diff --git a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py index a38b9d6b1e6..42842781974 100644 --- a/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py +++ b/lldb/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py @@ -56,7 +56,7 @@ class WatchpointConditionAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py index 9380c4c2346..d88c33d6719 100644 --- a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py +++ b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py @@ -54,7 +54,7 @@ class SetWatchlocationAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py index c051f98f3e7..781c87451bf 100644 --- a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py +++ b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py @@ -68,7 +68,7 @@ class TargetWatchAddressAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() @@ -127,7 +127,7 @@ class TargetWatchAddressAPITestCase(TestBase): VALID_BREAKPOINT) # Now launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # We should be stopped due to the breakpoint. Get frame #0. process = target.GetProcess() diff --git a/lldb/test/source-manager/TestSourceManager.py b/lldb/test/source-manager/TestSourceManager.py index 879b9f1b97e..bcb73721ff7 100644 --- a/lldb/test/source-manager/TestSourceManager.py +++ b/lldb/test/source-manager/TestSourceManager.py @@ -50,7 +50,7 @@ class SourceManagerTestCase(TestBase): self.assertTrue(target, VALID_TARGET) # Launch the process, and do not stop at the entry point. - process = target.LaunchSimple(None, None, os.getcwd()) + process = target.LaunchSimple (None, None, self.get_process_working_directory()) # # Exercise Python APIs to display source lines. |