[Lldb-commits] [PATCH] [TestGlobalVariables] LD_LIBRARY_PATH should be process working directory.

Chaoren Lin chaorenl at google.com
Tue Mar 3 14:45:35 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py:34-44
@@ -33,8 +33,13 @@
         self.shlib_names = ["a"]
         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))
----------------
clayborg wrote:
> You shouldn't have to do any of this if you call:
> 
> ```
> environment = self.registerSharedLibrariesWithTarget(target, self.shlib_names)
> ```
> 
> as the code in registerSharedLibrariesWithTarget there should do this. Can you look into why this is failing? We don't want platform specific code like this in any tests, it should all be in utility functions in the python files in the lldb/test directory.
You're right. I'll remove that entire chunk of code. I think Oleksiy has a CL in progress that can fix remote module loading problem.

http://reviews.llvm.org/D8038

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list