[Lldb-commits] [lldb] r187520 - Add the LD_LIBRARY_PATH to target.env-vars for tests expecting libimf.so when testing with ICC.
Matt Kopec
Matt.Kopec at intel.com
Wed Jul 31 13:13:05 PDT 2013
Author: mkopec
Date: Wed Jul 31 15:13:04 2013
New Revision: 187520
URL: http://llvm.org/viewvc/llvm-project?rev=187520&view=rev
Log:
Add the LD_LIBRARY_PATH to target.env-vars for tests expecting libimf.so when testing with ICC.
Patch from Andy Kaylor.
Modified:
lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py
lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py
lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
Modified: lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py?rev=187520&r1=187519&r2=187520&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py (original)
+++ lldb/trunk/test/lang/c/global_variables/TestGlobalVariables.py Wed Jul 31 15:13:04 2013
@@ -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',
Modified: lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py?rev=187520&r1=187519&r2=187520&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py (original)
+++ lldb/trunk/test/lang/c/shared_lib/TestSharedLib.py Wed Jul 31 15:13:04 2013
@@ -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):
Modified: lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py?rev=187520&r1=187519&r2=187520&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py (original)
+++ lldb/trunk/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py Wed Jul 31 15:13:04 2013
@@ -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):
More information about the lldb-commits
mailing list