diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command')
23 files changed, 27 insertions, 25 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py b/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py index 2d4504f7ba4..6a8fb5db543 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py @@ -32,7 +32,8 @@ class TestExprLookupAnonStructTypedef(TestBase): """Test typedeffed untagged struct arguments for function call expressions""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file "+self.getBuildArtifact("a.out"), + CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.cpp", diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py b/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py index 16736f79852..079ab6d6088 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py @@ -30,7 +30,8 @@ class ExprCommandCallFunctionTestCase(TestBase): def test_with(self): """Test calling std::String member function.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), + CURRENT_EXECUTABLE_SET) # Some versions of GCC encode two locations for the 'return' statement # in main.cpp diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py b/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py index a48a38aaf92..63511779a92 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py @@ -31,7 +31,7 @@ class ExprCommandCallStopContinueTestCase(TestBase): def test(self): """Test gathering result from interrupted function call.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) # Some versions of GCC encode two locations for the 'return' statement # in main.cpp diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py b/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py index fda81ae8c36..ff3bd99ced9 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py @@ -37,7 +37,7 @@ class ExprCommandCallUserDefinedFunction(TestBase): self.build() # Set breakpoint in main and run exe - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py b/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py index dcfb648ada5..dd31424dbbd 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py @@ -22,7 +22,7 @@ class ExprSyscallTestCase(TestBase): self.expr_syscall() def expr_syscall(self): - exe = os.path.join(os.getcwd(), 'a.out') + exe = self.getBuildArtifact("a.out") # Create a target by the debugger. target = self.dbg.CreateTarget(exe) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py b/lldb/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py index c4126a32968..f14b02bbd7c 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py @@ -43,7 +43,7 @@ class ExprFormattersTestCase(TestBase): self.addTearDownHook(cleanup) """Test expr + formatters for good interoperability.""" - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, loc_exact=True) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py b/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py index 894d0bfaa86..a5607f19505 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py @@ -17,7 +17,7 @@ class IRInterpreterPHINodesTestCase(TestBase): """Test support for PHI nodes in the IR interpreter.""" self.build() - exe = os.path.join(os.getcwd(), 'a.out') + exe = self.getBuildArtifact("a.out") self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET) # Break on the first assignment to i diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py b/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py index 5c5110b6994..c0f50109ddb 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py @@ -34,7 +34,7 @@ class IRInterpreterTestCase(TestBase): """Test the IR interpreter""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.c", self.line, num_expected_locations=1, loc_exact=False) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py b/lldb/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py index aa369ebeff8..7f639a46220 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/multiline/TestMultilineExpressions.py @@ -28,7 +28,7 @@ class MultilineExpressionsTestCase(TestBase): """Test that multiline expressions work correctly""" self.build() import pexpect - exe = os.path.join(os.getcwd(), "a.out") + exe = self.getBuildArtifact("a.out") prompt = "(lldb) " # So that the child gets torn down after the test. diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py b/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py index b4e9a8bfeab..1dbafc36a82 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py @@ -28,7 +28,7 @@ class ExprOptionsTestCase(TestBase): self.main_source = "main.cpp" self.main_source_spec = lldb.SBFileSpec(self.main_source) self.line = line_number('main.cpp', '// breakpoint_in_main') - self.exe = os.path.join(os.getcwd(), "a.out") + self.exe = self.getBuildArtifact("a.out") def test_expr_options(self): """These expression command options should work as expected.""" diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py b/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py index e6c9d43adf0..b6471d0f897 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py @@ -34,7 +34,7 @@ class PersistObjCPointeeType(TestBase): # Execute the cleanup function during test case tear down. self.addTearDownHook(cleanup) - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.m", self.line, loc_exact=True) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py b/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py index 118b9f32c4b..7b963b5bfcd 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py @@ -28,7 +28,7 @@ class PersistentPtrUpdateTestCase(TestBase): # Execute the cleanup function during test case tear down. self.addTearDownHook(cleanup) - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) self.runCmd('break set -p here') diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py b/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py index 12452a96377..f4ee1b0fb62 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py @@ -22,7 +22,7 @@ class NestedPersistentTypesTestCase(TestBase): """Test that nested persistent types work.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) self.runCmd("breakpoint set --name main") diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py b/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py index 3d4df307d1b..f56cb11a80d 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py @@ -22,7 +22,7 @@ class PersistenttypesTestCase(TestBase): """Test that lldb persistent types works correctly.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) self.runCmd("breakpoint set --name main") diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py b/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py index b6f027964ba..441a60b5a46 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py @@ -19,7 +19,7 @@ class PersistentVariablesTestCase(TestBase): """Test that lldb persistent variables works correctly.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) self.runCmd("breakpoint set --source-pattern-regexp break") diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py b/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py index 13f8f58564e..4530342ea52 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py @@ -37,7 +37,7 @@ class PoVerbosityTestCase(TestBase): self.addTearDownHook(cleanup) """Test expr + formatters for good interoperability.""" - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.m", self.line, loc_exact=True) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py b/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py index ca43585616e..0027fc226e3 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py @@ -19,7 +19,7 @@ class Radar8638051TestCase(TestBase): """The following expression commands should not crash.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) self.runCmd("breakpoint set -n c") diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py b/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py index c4d899cfc1e..c44cb6fc39d 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py @@ -23,7 +23,7 @@ class Radar9531204TestCase(TestBase): """The evaluating printf(...) after break stop and then up a stack frame.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_symbol( self, 'foo', sym_exact=True, num_expected_locations=1) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py b/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py index 4fc2463b25a..dfef8735071 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py @@ -29,7 +29,7 @@ class Radar9673644TestCase(TestBase): """The following expression commands should just work.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py b/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py index 1cd11a8c275..3af7d808e12 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py @@ -45,7 +45,7 @@ class BasicExprCommandsTestCase(TestBase): """These basic expression commands should work as expected.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False) @@ -107,7 +107,7 @@ class BasicExprCommandsTestCase(TestBase): """Test SBFrame.EvaluateExpression() API for evaluating an expression.""" self.build() - exe = os.path.join(os.getcwd(), "a.out") + exe = self.getBuildArtifact("a.out") target = self.dbg.CreateTarget(exe) self.assertTrue(target, VALID_TARGET) @@ -208,7 +208,7 @@ class BasicExprCommandsTestCase(TestBase): """Throw some expression commands with quotes at lldb.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py b/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py index 35ac151a390..8a949bcd779 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py @@ -31,7 +31,7 @@ class ExprCommands2TestCase(TestBase): """Test some more expression commands.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py b/lldb/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py index dfe95a1a9fa..590e2cf3676 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py @@ -37,7 +37,7 @@ class TopLevelExpressionsTestCase(TestBase): """Test top-level expressions.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False) diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py b/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py index 1ce75144017..bac8e5453e4 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py @@ -28,7 +28,7 @@ class ObjCTypeQueryTestCase(TestBase): def test(self): """The expression parser's type search should be wider than the current compilation unit.""" self.build() - self.runCmd("file a.out", CURRENT_EXECUTABLE_SET) + self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET) lldbutil.run_break_set_by_file_and_line( self, "main.m", self.line, num_expected_locations=1, loc_exact=True) |