summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/c
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/c')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py8
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py2
23 files changed, 29 insertions, 29 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py b/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
index 6d5f61ebb8b..930a09412ea 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
@@ -88,7 +88,7 @@ class AnonymousTestCase(TestBase):
self.dbg.SetAsync(False)
# Create a target
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
@@ -150,7 +150,7 @@ class AnonymousTestCase(TestBase):
self.dbg.SetAsync(False)
# Create a target
- 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/c/array_types/TestArrayTypes.py b/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
index d4716de907c..d14534db69c 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
@@ -24,7 +24,7 @@ class ArrayTypesTestCase(TestBase):
def test_and_run_command(self):
"""Test 'frame variable var_name' on some variables with array types."""
self.build()
- 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(
@@ -85,7 +85,7 @@ class ArrayTypesTestCase(TestBase):
def test_and_python_api(self):
"""Use Python APIs to inspect variables with array types."""
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/c/bitfields/TestBitfields.py b/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
index 4d0eb48c3b5..22b8a299100 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -27,7 +27,7 @@ class BitfieldsTestCase(TestBase):
def test_and_run_command(self):
"""Test 'frame variable ...' on a variable with bitfields."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# Break inside the main.
@@ -123,7 +123,7 @@ class BitfieldsTestCase(TestBase):
def test_and_python_api(self):
"""Use Python APIs to inspect a bitfields variable."""
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/c/blocks/TestBlocks.py b/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py
index 4025635eec6..c7693c98f54 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py
@@ -26,7 +26,7 @@ class BlocksTestCase(TestBase):
def launch_common(self):
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
self.is_started = False
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
index baa3c915ade..3ba4628e478 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
@@ -18,8 +18,8 @@ class TestConflictingSymbols(TestBase):
def test_conflicting_symbols(self):
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
- target = self.dbg.CreateTarget("a.out")
+ exe = self.getBuildArtifact("a.out")
+ target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
# Register our shared libraries for remote targets so they get
@@ -89,8 +89,8 @@ class TestConflictingSymbols(TestBase):
@expectedFailureAll(bugnumber="llvm.org/pr35043")
def test_shadowed(self):
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
- target = self.dbg.CreateTarget("a.out")
+ exe = self.getBuildArtifact("a.out")
+ target = self.dbg.CreateTarget(exe)
self.assertTrue(target, VALID_TARGET)
# Register our shared libraries for remote targets so they get
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py b/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
index d54435a4c67..bf86e03035f 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
@@ -38,7 +38,7 @@ class ConstVariableTestCase(TestBase):
def test_and_run_command(self):
"""Test interpreted and JITted expressions on constant values."""
self.build()
- 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/c/enum_types/TestEnumTypes.py b/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
index b4ea9fae043..53ee2196aa4 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
@@ -24,7 +24,7 @@ class EnumTypesTestCase(TestBase):
def test(self):
"""Test 'image lookup -t days' and check for correct display and enum value printing."""
self.build()
- 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/c/find_struct_type/TestFindStructTypes.py b/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py
index bbe5be67c08..75aef291cc4 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py
@@ -33,7 +33,7 @@ class TestFindTypesOnStructType(TestBase):
def do_test(self):
"""Make sure FindTypes actually finds 'struct typename' not just 'typename'."""
- 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/c/forward/TestForwardDeclaration.py b/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
index 60e7073f146..c118ca95a0e 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
@@ -17,7 +17,7 @@ class ForwardDeclarationTestCase(TestBase):
def test_and_run_command(self):
"""Display *bar_ptr when stopped on a function with forward declaration of struct bar."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# Break inside the foo function which takes a bar_ptr argument.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py b/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py
index 35e902e5bdc..7ed8a28546c 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py
@@ -66,7 +66,7 @@ class FunctionTypesTestCase(TestBase):
startstr='(int) $2 = 12')
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/c/global_variables/TestGlobalVariables.py b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py
index dd4da061fdc..0d95bcefb85 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py
@@ -27,7 +27,7 @@ class GlobalVariablesTestCase(TestBase):
self.build()
# 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 main.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py b/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py
index af6c3a722e4..8d8d57bc9ca 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py
@@ -28,7 +28,7 @@ class CModulesTestCase(TestBase):
@skipIf(macos_version=["<", "10.12"])
def test_expr(self):
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# Break inside the foo function which takes a bar_ptr argument.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py b/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
index 1f3ae3ffcb5..8221148c29a 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
@@ -114,7 +114,7 @@ class RegisterVariableTestCase(TestBase):
register_variables_count = 0
self.build()
- 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/c/set_values/TestSetValues.py b/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py
index bb94f1c4182..14677fc548a 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py
@@ -28,7 +28,7 @@ class SetValuesTestCase(TestBase):
def test(self):
"""Test settings and readings of program variables."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# Set breakpoints on several places to set program variables.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py
index 5505d15854d..95993fe8e4b 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py
@@ -73,7 +73,7 @@ class SharedLibTestCase(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)
self.runCmd("settings set target.preload-symbols " + str(preload_symbols).lower())
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
index 7b371a2a9a9..c7bc75337db 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
@@ -62,7 +62,7 @@ class SharedLibStrippedTestCase(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/c/step-target/TestStepTarget.py b/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
index 90f07860afa..a767997eaee 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
@@ -24,7 +24,7 @@ class TestStepTarget(TestBase):
@add_test_categories(['pyapi'])
def get_to_start(self):
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/c/stepping/TestStepAndBreakpoints.py b/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py
index e1916a550a1..4a4052cfa33 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py
@@ -28,7 +28,7 @@ class TestCStepping(TestBase):
def test_and_python_api(self):
"""Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
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/c/stepping/TestThreadStepping.py b/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py
index c436000d882..62a0bf8e33e 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py
@@ -34,7 +34,7 @@ class ThreadSteppingTestCase(TestBase):
def test_step_out_with_run_command(self):
"""Exercise thread step-out and frame select followed by thread step-out."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
# Create a breakpoint inside function 'c'.
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py b/lldb/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py
index 27821845e28..b1c8a5ecf4b 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/strings/TestCStrings.py
@@ -15,7 +15,7 @@ class CStringsTestCase(TestBase):
def test_with_run_command(self):
"""Tests that C strings work as expected in expressions"""
self.build()
- self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
+ self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
line = line_number('main.c', '// breakpoint 1')
lldbutil.run_break_set_by_file_and_line(
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py b/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
index 4388d95840e..0223858ca58 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
@@ -48,7 +48,7 @@ class TlsGlobalTestCase(TestBase):
def test(self):
"""Test thread-local storage."""
self.build()
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
if self.platformIsDarwin():
self.registerSharedLibrariesWithTarget(target, ['liba.dylib'])
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py b/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
index 71d00c5a9a6..bbae76b5752 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
@@ -26,7 +26,7 @@ class TypedefTestCase(TestBase):
def image_lookup_for_multiple_typedefs(self):
"""Test 'image lookup -t a' at different scopes and check for correct display."""
- exe = os.path.join(os.getcwd(), "a.out")
+ exe = self.getBuildArtifact("a.out")
self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
typearray = (
"float",
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py b/lldb/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py
index 496398b1d0a..8764f521130 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/unions/TestUnionMembers.py
@@ -47,7 +47,7 @@ class TestUnionMembers(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)
OpenPOWER on IntegriCloud