aboutsummaryrefslogtreecommitdiff
path: root/test/lang/c/shared_lib/TestSharedLib.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lang/c/shared_lib/TestSharedLib.py')
-rw-r--r--test/lang/c/shared_lib/TestSharedLib.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/lang/c/shared_lib/TestSharedLib.py b/test/lang/c/shared_lib/TestSharedLib.py
index f51f8c1e5..731670677 100644
--- a/test/lang/c/shared_lib/TestSharedLib.py
+++ b/test/lang/c/shared_lib/TestSharedLib.py
@@ -40,7 +40,10 @@ class SharedLibTestCase(TestBase):
# Find the line number to break inside main().
self.line = line_number('main.c', '// Set breakpoint 0 here.')
if sys.platform.startswith("linux"):
- self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.getcwd())
+ if "LD_LIBRARY_PATH" in os.environ:
+ self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.environ["LD_LIBRARY_PATH"] + ":" + os.getcwd())
+ else:
+ self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.getcwd())
self.addTearDownHook(lambda: self.runCmd("settings remove target.env-vars " + self.dylibPath))
def common_setup(self):