diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp')
10 files changed, 14 insertions, 23 deletions
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 5cbcfdf9687..a344c4f7d18 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 @@ -18,9 +18,7 @@ class TestCppChainedCalls(TestBase): self.assertTrue(src_file_spec.IsValid(), "Main source file") # Get the path of the executable - cwd = os.getcwd() - exe_file = self.getBuildArtifact("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/dynamic-value/TestCppValueCast.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py index 74b94517fa0..276794ca422 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py @@ -51,7 +51,7 @@ class CppValueCastTestCase(TestBase): def do_sbvalue_cast(self, exe_name): """Test SBValue::Cast(SBType) API for C++ types.""" - exe = os.path.join(os.getcwd(), exe_name) + exe = self.getBuildArtifact(exe_name) # Create a target from the debugger. 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 866bae7f7d2..fa68d0a1502 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 @@ -20,7 +20,6 @@ class TestCppGlobalOperators(TestBase): self.assertTrue(src_file_spec.IsValid(), "Main source file") # Get the path of the executable - cwd = os.getcwd() exe_path = self.getBuildArtifact("a.out") # Load the executable 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 643dd2f81ff..b9f25537258 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/TestWithModuleDebugging.py @@ -13,9 +13,8 @@ class TestWithGmodulesDebugInfo(TestBase): @add_test_categories(["gmodules"]) def test_specialized_typedef_from_pch(self): self.build() - cwd = os.getcwd() - src_file = os.path.join(cwd, "main.cpp") + src_file = os.path.join(self.getSourceDir(), "main.cpp") src_file_spec = lldb.SBFileSpec(src_file) self.assertTrue(src_file_spec.IsValid(), "breakpoint file") diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile index bea4bf96e60..2ce96e90d2d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile @@ -19,16 +19,16 @@ nolimit: main.o length_nolimit.o a.o $(CXX) main.o length_nolimit.o a.o -o nolimit $(LDFLAGS) main.o: main.cpp - $(CXX) $(CFLAGS_LIMIT) main.cpp -o main.o + $(CXX) $(CFLAGS_LIMIT) $(SRCDIR)/main.cpp -o main.o length_limit.o: length.cpp - $(CXX) $(CFLAGS_LIMIT) length.cpp -o length_limit.o + $(CXX) $(CFLAGS_LIMIT) $(SRCDIR)/length.cpp -o length_limit.o length_nolimit.o: length.cpp - $(CXX) $(CFLAGS_NO_LIMIT) length.cpp -o length_nolimit.o + $(CXX) $(CFLAGS_NO_LIMIT) $(SRCDIR)/length.cpp -o length_nolimit.o a.o: a.cpp - $(CXX) $(CFLAGS_NO_DEBUG) -c a.cpp -o a.o + $(CXX) $(CFLAGS_NO_DEBUG) -c $(SRCDIR)/a.cpp -o a.o clean: OBJECTS += limit nolimit length_limit.o length_nolimit.o length_limit.dwo length_nolimit.dwo diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py index 505a27a0a67..c7368a41a30 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/TestCppIncompleteTypes.py @@ -51,8 +51,7 @@ class TestCppIncompleteTypes(TestBase): self.assertTrue(src_file_spec.IsValid(), "Main source file") # Get the path of the executable - cwd = os.getcwd() - exe_path = os.path.join(cwd, exe) + exe_path = self.getBuildArtifact(exe) # Load the executable target = self.dbg.CreateTarget(exe_path) 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 f7a3f91e158..ae50d3d3966 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 @@ -12,9 +12,7 @@ class TestWithLimitDebugInfo(TestBase): def test_limit_debug_info(self): self.build() - cwd = os.getcwd() - - src_file = os.path.join(cwd, "main.cpp") + src_file = os.path.join(self.getSourceDir(), "main.cpp") src_file_spec = lldb.SBFileSpec(src_file) self.assertTrue(src_file_spec.IsValid(), "breakpoint file") diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile index 0041add935a..9e52bacd5fc 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile @@ -9,11 +9,11 @@ include $(LEVEL)/Makefile.rules a.out: lib_a lib_b lib_%: - $(MAKE) -f $*.mk + $(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/$*.mk hidden_lib_d: $(MAKE) -C hidden clean:: - $(MAKE) -f a.mk clean - $(MAKE) -f b.mk clean + $(MAKE) -f $(SRCDIR)/a.mk clean + $(MAKE) -f $(SRCDIR)/b.mk clean 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 b1e6e080be3..f42d194cd62 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/TestCppNsImport.py @@ -16,12 +16,11 @@ class TestCppNsImport(TestBase): self.build() # Get main source file - src_file = "main.cpp" + src_file = os.path.join(self.getSourceDir(), "main.cpp") src_file_spec = lldb.SBFileSpec(src_file) self.assertTrue(src_file_spec.IsValid(), "Main source file") # Get the path of the executable - cwd = os.getcwd() exe_path = self.getBuildArtifact("a.out") # Load the executable 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 ba1e6bd06f9..5cd9e4ed1b4 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py @@ -23,12 +23,11 @@ class TestCppScopes(TestBase): self.build() # Get main source file - src_file = "main.cpp" + src_file = os.path.join(self.getSourceDir(), "main.cpp") src_file_spec = lldb.SBFileSpec(src_file) self.assertTrue(src_file_spec.IsValid(), "Main source file") # Get the path of the executable - cwd = os.getcwd() exe_path = self.getBuildArtifact("a.out") # Load the executable |