aboutsummaryrefslogtreecommitdiff
path: root/test/lang/c/global_variables/TestGlobalVariables.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lang/c/global_variables/TestGlobalVariables.py')
-rw-r--r--test/lang/c/global_variables/TestGlobalVariables.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/lang/c/global_variables/TestGlobalVariables.py b/test/lang/c/global_variables/TestGlobalVariables.py
index 32a1501f1..336652642 100644
--- a/test/lang/c/global_variables/TestGlobalVariables.py
+++ b/test/lang/c/global_variables/TestGlobalVariables.py
@@ -30,7 +30,10 @@ class GlobalVariablesTestCase(TestBase):
self.line = line_number('main.c', '// Set break point at this line.')
if sys.platform.startswith("linux"):
# On Linux, LD_LIBRARY_PATH must be set so the shared libraries are found on startup
- 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 global_variables(self):
@@ -43,6 +46,8 @@ class GlobalVariablesTestCase(TestBase):
self.runCmd("run", RUN_SUCCEEDED)
+ self.runCmd("process status", "Get process status")
+
# The stop reason of the thread should be breakpoint.
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['stopped',