Skip to content

Commit

Permalink
[TestGlobalVariables] LD_LIBRARY_PATH should be process working direc…
Browse files Browse the repository at this point in the history
…tory.

Summary:
The inferior can load the library now, but the remote test is still failing
because of a module loading problem in LLDB.

Reviewers: ovyalov, sivachandra, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8038

llvm-svn: 231120
  • Loading branch information
chaoren committed Mar 3, 2015
1 parent b3be398 commit 6efb8bd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lldb/test/lang/c/global_variables/TestGlobalVariables.py
Expand Up @@ -34,9 +34,14 @@ def setUp(self):
if sys.platform.startswith("freebsd") or sys.platform.startswith("linux"):
# LD_LIBRARY_PATH must be set so the shared libraries are found on startup
if "LD_LIBRARY_PATH" in os.environ:
self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.environ["LD_LIBRARY_PATH"] + ":" + os.getcwd())
self.runCmd("settings set target.env-vars " +
self.dylibPath + "=" +
os.environ["LD_LIBRARY_PATH"] + ":" +
self.get_process_working_directory())
else:
self.runCmd("settings set target.env-vars " + self.dylibPath + "=" + os.getcwd())
self.runCmd("settings set target.env-vars " +
self.dylibPath + "=" +
self.get_process_working_directory())
self.addTearDownHook(lambda: self.runCmd("settings remove target.env-vars " + self.dylibPath))

def global_variables(self):
Expand Down

0 comments on commit 6efb8bd

Please sign in to comment.