summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2018-01-19 23:24:35 +0000
committerAdrian Prantl <aprantl@apple.com>2018-01-19 23:24:35 +0000
commit595048f3ecf3317aa2d32bed5141a526415f5aea (patch)
tree92980c57a7209f1ec112bb5f938b2021fec08f21 /lldb/packages/Python/lldbsuite/test/lang/cpp
parentce8746d178dba08ae576c7f53448772d6728d2f5 (diff)
downloadbcm5719-llvm-595048f3ecf3317aa2d32bed5141a526415f5aea.tar.gz
bcm5719-llvm-595048f3ecf3317aa2d32bed5141a526415f5aea.zip
Wrap all references to build artifacts in the LLDB testsuite (NFC)
in TestBase::getBuildArtifact(). This NFC commit is in preparation for https://reviews.llvm.org/D42281 (compile the LLDB tests out-of-tree). Differential Revision: https://reviews.llvm.org/D42280 llvm-svn: 323007
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py14
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py3
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py8
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py16
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py3
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py3
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py2
38 files changed, 57 insertions, 58 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py
index 1fb7a521749..b10b4986d37 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/TestCPPAuto.py
@@ -18,7 +18,7 @@ class CPPAutoTestCase(TestBase):
def test_with_run_command(self):
"""Test that auto types work in the expression parser"""
self.build()
- self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+ self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
line = line_number('main.cpp', '// break here')
lldbutil.run_break_set_by_file_and_line(
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py
index 01f8cbacc36..27ea773c5db 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/TestCPPBool.py
@@ -13,7 +13,7 @@ class CPPBoolTestCase(TestBase):
def test_with_run_command(self):
"""Test that bool types work in the expression parser"""
self.build()
- self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+ self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
line = line_number('main.cpp', '// breakpoint 1')
lldbutil.run_break_set_by_file_and_line(
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
index 81787e1e226..a12051014da 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
@@ -35,7 +35,7 @@ class CPPBreakpointCommandsTestCase(TestBase):
"""Test a sequence of breakpoint command add, list, and delete."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
# Create a target from the debugger.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py
index b86cd2ac9c7..9b227bc8d3c 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/TestCallCPPFunction.py
@@ -22,7 +22,7 @@ class CallCPPFunctionTestCase(TestBase):
def test_with_run_command(self):
"""Test calling a function by basename"""
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=True)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py
index 0145bee3fc5..5cbcfdf9687 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/TestCppChainedCalls.py
@@ -19,7 +19,7 @@ class TestCppChainedCalls(TestBase):
# Get the path of the executable
cwd = os.getcwd()
- exe_file = "a.out"
+ exe_file = self.getBuildArtifact("a.out")
exe_path = os.path.join(cwd, exe_file)
# Load the executable
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
index bf8605106ad..e37e76ae9c0 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
@@ -32,7 +32,7 @@ class Char1632TestCase(TestBase):
def test(self):
"""Test that the C++11 support for char16_t and char32_t works correctly."""
self.build()
- 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/lang/cpp/class_static/TestStaticVariables.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py
index d167f0a5591..e48538e486b 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py
@@ -27,7 +27,7 @@ class StaticVariableTestCase(TestBase):
def test_with_run_command(self):
"""Test that file and class static variables display correctly."""
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=True)
@@ -67,7 +67,7 @@ class StaticVariableTestCase(TestBase):
def test_with_python_api(self):
"""Test Python APIs on file and class static variables."""
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)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
index c915e4b32fa..759da716b18 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
@@ -24,7 +24,7 @@ class ClassTypesTestCase(TestBase):
def test_with_run_command(self):
"""Test 'frame variable this' when stopped on a class constructor."""
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 ctor function of class C.
@@ -61,7 +61,7 @@ class ClassTypesTestCase(TestBase):
def test_with_python_api(self):
"""Use Python APIs to create a breakpoint by (filespec, line)."""
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)
@@ -72,7 +72,8 @@ class ClassTypesTestCase(TestBase):
fsDir = os.path.normpath(filespec.GetDirectory())
fsFile = filespec.GetFilename()
- self.assertTrue(fsDir == os.getcwd() and fsFile == "a.out",
+ self.assertTrue(fsDir == os.path.dirname(self.getBuildArtifact())
+ and fsFile == "a.out",
"FileSpec matches the executable")
bpfilespec = lldb.SBFileSpec("main.cpp", False)
@@ -119,7 +120,7 @@ class ClassTypesTestCase(TestBase):
def test_with_expr_parser(self):
"""Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# rdar://problem/8516141
@@ -176,7 +177,7 @@ class ClassTypesTestCase(TestBase):
def test_with_constructor_name(self):
"""Test 'frame variable this' and 'expr this' when stopped inside a constructor."""
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)
@@ -187,7 +188,8 @@ class ClassTypesTestCase(TestBase):
fsDir = os.path.normpath(filespec.GetDirectory())
fsFile = filespec.GetFilename()
- self.assertTrue(fsDir == os.getcwd() and fsFile == "a.out",
+ self.assertTrue(fsDir == os.path.dirname(self.getBuildArtifact())
+ and fsFile == "a.out",
"FileSpec matches the executable")
bpfilespec = lldb.SBFileSpec("main.cpp", False)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py
index bc85ba5181e..c8381787475 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py
@@ -78,7 +78,7 @@ class IterateFrameAndDisassembleTestCase(TestBase):
def breakOnCtor(self):
"""Setup/run the program so it stops on C's constructor."""
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# Break on the ctor function of class C.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py
index c6f9d85cd2c..c1d0d236268 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/TestDiamond.py
@@ -13,7 +13,7 @@ class CPPTestDiamondInheritance(TestBase):
def test_with_run_command(self):
"""Test that virtual base classes work in when SBValue objects are used to explore the variable value"""
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)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py
index 42db14f21e0..acda4261b11 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py
@@ -37,7 +37,7 @@ class DynamicValueTestCase(TestBase):
def test_get_dynamic_vals(self):
"""Test fetching C++ dynamic values from pointers & references."""
self.build(dictionary=self.getBuildFlags())
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
# Create a target from the debugger.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
index 82e44fb1759..7f7b8251fc0 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
@@ -78,7 +78,7 @@ class CPP11EnumTypesTestCase(TestBase):
def image_lookup_for_enum_type(self):
"""Test C++11 enumeration class types."""
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# Break inside the main.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
index 4bc33205319..d1aea00b0e8 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
@@ -30,7 +30,7 @@ class CPPBreakpointTestCase(TestBase):
def test(self):
"""Test lldb exception breakpoint command for CPP."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
# Create a target from the debugger.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
index c37107e898c..6352b68e7d7 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/TestFrameVariableAnonymousUnions.py
@@ -13,7 +13,7 @@ class FrameVariableAnonymousUnionsTestCase(TestBase):
def test_with_run_command(self):
"""Tests that frame variable looks into anonymous unions"""
self.build()
- self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+ self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
line = line_number('main.cpp', '// break here')
lldbutil.run_break_set_by_file_and_line(
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py
index 21d86f973a3..866bae7f7d2 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/TestCppGlobalOperators.py
@@ -21,8 +21,7 @@ class TestCppGlobalOperators(TestBase):
# Get the path of the executable
cwd = os.getcwd()
- exe_file = "a.out"
- exe_path = os.path.join(cwd, exe_file)
+ exe_path = self.getBuildArtifact("a.out")
# Load the executable
target = self.dbg.CreateTarget(exe_path)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
index dcc9206867b..a4bfd73ea46 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py
@@ -19,7 +19,7 @@ class TestWithGmodulesDebugInfo(TestBase):
self.assertTrue(src_file_spec.IsValid(), "breakpoint file")
# Get the path of the executable
- exe_path = os.path.join(cwd, 'a.out')
+ exe_path = self.getBuildArtifact("a.out")
# Load the executable
target = self.dbg.CreateTarget(exe_path)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py
index 2dc72981c14..f7b92e8328e 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py
@@ -39,7 +39,7 @@ class InlinesTestCase(TestBase):
startstr='(int) $0 =')
def runToBreakpoint(self):
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# Break inside the main.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
index 89086e7a64b..f7a3f91e158 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/TestWithLimitDebugInfo.py
@@ -19,7 +19,7 @@ class TestWithLimitDebugInfo(TestBase):
self.assertTrue(src_file_spec.IsValid(), "breakpoint file")
# Get the path of the executable
- exe_path = os.path.join(cwd, 'a.out')
+ exe_path = self.getBuildArtifact("a.out")
# Load the executable
target = self.dbg.CreateTarget(exe_path)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
index 977ad7ddea1..011cf499291 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
@@ -221,7 +221,7 @@ class TestMembersAndLocalsWithSameName(TestBase):
self.assertTrue(self.src_file_spec.IsValid(), "breakpoint file")
# Get the path of the executable
- exe_path = os.path.join(cwd, 'a.out')
+ exe_path = self.getBuildArtifact("a.out")
# Load the executable
self.target = self.dbg.CreateTarget(exe_path)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
index f0bc12ce983..a3c31e63f49 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
@@ -31,7 +31,7 @@ class NamespaceBreakpointTestCase(TestBase):
"A::func(int)"]
# Create a target by the debugger.
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
module_list = lldb.SBFileSpecList()
@@ -56,7 +56,7 @@ class NamespaceBreakpointTestCase(TestBase):
names = ["func()", "func(int)"]
# Create a target by the debugger.
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
module_list = lldb.SBFileSpecList()
@@ -81,7 +81,7 @@ class NamespaceBreakpointTestCase(TestBase):
names = ["A::func()", "A::func(int)"]
# Create a target by the debugger.
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
module_list = lldb.SBFileSpecList()
@@ -132,7 +132,7 @@ class NamespaceTestCase(TestBase):
def test_with_run_command(self):
"""Test that anonymous and named namespace variables display correctly."""
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/lang/cpp/namespace/TestNamespaceLookup.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
index 18e45d9798a..2837cfd9244 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
@@ -50,7 +50,7 @@ class NamespaceLookupTestCase(TestBase):
def test_scope_lookup_with_run_command(self):
"""Test scope lookup of functions in 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,
@@ -151,7 +151,7 @@ class NamespaceLookupTestCase(TestBase):
def test_function_scope_lookup_with_run_command(self):
"""Test scope lookup of functions in 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,
@@ -188,7 +188,7 @@ class NamespaceLookupTestCase(TestBase):
def test_file_scope_lookup_with_run_command(self):
"""Test file scope lookup in 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,
@@ -208,7 +208,7 @@ class NamespaceLookupTestCase(TestBase):
def test_scope_lookup_before_using_with_run_command(self):
"""Test scope lookup before using in 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,
@@ -238,7 +238,7 @@ class NamespaceLookupTestCase(TestBase):
def test_scope_after_using_directive_lookup_with_run_command(self):
"""Test scope lookup after using directive in 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,
@@ -260,7 +260,7 @@ class NamespaceLookupTestCase(TestBase):
def test_scope_after_using_declaration_lookup_with_run_command(self):
"""Test scope lookup after using declaration in 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,
@@ -279,7 +279,7 @@ class NamespaceLookupTestCase(TestBase):
def test_scope_ambiguity_after_using_lookup_with_run_command(self):
"""Test scope lookup ambiguity after using in 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,
@@ -305,7 +305,7 @@ class NamespaceLookupTestCase(TestBase):
def test_scope_lookup_shadowed_by_using_with_run_command(self):
"""Test scope lookup shadowed by using in 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,
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
index 7160dddf454..1f3fbd8b7f7 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
@@ -46,7 +46,7 @@ class NamespaceDefinitionsTestCase(TestBase):
self.dbg.SetAsync(False)
# Create a target by the debugger.
- target = self.dbg.CreateTarget("a.out")
+ target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
self.assertTrue(target, VALID_TARGET)
# Break inside the foo function which takes a bar_ptr argument.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py
index fd19de7086d..b1e6e080be3 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py
@@ -22,8 +22,7 @@ class TestCppNsImport(TestBase):
# Get the path of the executable
cwd = os.getcwd()
- exe_file = "a.out"
- exe_path = os.path.join(cwd, exe_file)
+ exe_path = self.getBuildArtifact("a.out")
# Load the executable
target = self.dbg.CreateTarget(exe_path)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
index 3d8788fa790..996396d5992 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/TestOverloadedFunctions.py
@@ -22,7 +22,7 @@ class CPPStaticMethodsTestCase(TestBase):
def test_with_run_command(self):
"""Test that functions with the same name are resolved correctly"""
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=True)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py
index 11d221e171a..cc79366c714 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/TestRvalueReferences.py
@@ -22,7 +22,7 @@ class RvalueReferencesTestCase(TestBase):
def test_with_run_command(self):
"""Test that rvalues are supported in the C++ expression parser"""
self.build()
- self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+ self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
self.set_breakpoint(line_number('main.cpp', '// breakpoint 2'))
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
index d5ff93f0cc1..ba1e6bd06f9 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
@@ -29,8 +29,7 @@ class TestCppScopes(TestBase):
# Get the path of the executable
cwd = os.getcwd()
- exe_file = "a.out"
- exe_path = os.path.join(cwd, exe_file)
+ exe_path = self.getBuildArtifact("a.out")
# Load the executable
target = self.dbg.CreateTarget(exe_path)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
index 5925b10143e..36546a5eee1 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
@@ -33,7 +33,7 @@ class SignedTypesTestCase(TestBase):
self.dbg.SetAsync(False)
# Create a target by the debugger.
- target = self.dbg.CreateTarget("a.out")
+ target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
self.assertTrue(target, VALID_TARGET)
lldbutil.run_break_set_by_file_and_line(
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py
index 16b56758816..b8c777f417a 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py
@@ -21,7 +21,7 @@ class CPPStaticMembersTestCase(TestBase):
def test_with_run_command(self):
"""Test that member variables have the correct layout, scope and qualifiers when stopped inside and outside C++ methods"""
self.build()
- self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+ self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
self.set_breakpoint(line_number('main.cpp', '// breakpoint 2'))
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py
index 9c263053879..404ef22a0b8 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/TestCPPStaticMethods.py
@@ -20,7 +20,7 @@ class CPPStaticMethodsTestCase(TestBase):
def test_with_run_command(self):
"""Test that static methods are properly distinguished from regular methods"""
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=True)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py
index ce5869742f4..afaf9d1a076 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py
@@ -30,7 +30,7 @@ class STLTestCase(TestBase):
def test(self):
"""Test some expressions involving STL data types."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
# The following two lines, if uncommented, will enable loggings.
#self.ci.HandleCommand("log enable -f /tmp/lldb.log lldb default", res)
@@ -78,7 +78,7 @@ class STLTestCase(TestBase):
def test_SBType_template_aspects(self):
"""Test APIs for getting template arguments from an SBType."""
self.build()
- 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/lang/cpp/stl/TestStdCXXDisassembly.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py
index 47fdf59a27e..23e94e9addc 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py
@@ -31,7 +31,7 @@ class StdCXXDisassembleTestCase(TestBase):
def test_stdcxx_disasm(self):
"""Do 'disassemble' on each and every 'Code' symbol entry from the std c++ lib."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# rdar://problem/8543077
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py
index b59f966236b..5e90b8bb80a 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py
@@ -19,7 +19,7 @@ class TemplateArgsTestCase(TestBase):
self.build()
# Create a target by the debugger.
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py
index ed2e257dc31..43b00f97d8f 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/this/TestCPPThis.py
@@ -24,7 +24,7 @@ class CPPThisTestCase(TestBase):
def test_with_run_command(self):
"""Test that the appropriate member variables are available when stopped in C++ static, inline, and const methods"""
self.build()
- self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+ self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
self.set_breakpoint(line_number('main.cpp', '// breakpoint 1'))
self.set_breakpoint(line_number('main.cpp', '// breakpoint 2'))
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py
index 842d03ae519..216f86064dc 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py
@@ -69,7 +69,7 @@ class UnicodeLiteralsTestCase(TestBase):
self.skipTest(
"Skipping because this test is known to crash on i386")
- 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/lang/cpp/unique-types/TestUniqueTypes.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py
index 3afac33ab39..1f9e17ff476 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py
@@ -33,7 +33,7 @@ class UniqueTypesTestCase(TestBase):
self.skipTest(
"rdar://problem/9173060 lldb hangs while running unique-types for clang version < 3")
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, 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/lang/cpp/unsigned_types/TestUnsignedTypes.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
index 0189a65bec3..3e9316079b2 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
@@ -27,7 +27,7 @@ class UnsignedTypesTestCase(TestBase):
def test(self):
"""Test that variables with unsigned types display correctly."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# GCC puts a breakpoint on the last line of a multi-line expression, so
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py
index 7356484e69a..b3fe9c40c19 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py
@@ -45,7 +45,7 @@ class CppVirtualMadness(TestBase):
self.dbg.SetAsync(False)
# Create a target by the debugger.
- target = self.dbg.CreateTarget("a.out")
+ target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
self.assertTrue(target, VALID_TARGET)
# Create the breakpoint inside function 'main'.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py
index f17ba6f4a22..f31ba9b5c8b 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py
@@ -28,7 +28,7 @@ class CxxWCharTTestCase(TestBase):
def test(self):
"""Test that C++ supports wchar_t correctly."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
# Create a target by the debugger.
target = self.dbg.CreateTarget(exe)
OpenPOWER on IntegriCloud