aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kopec <Matt.Kopec@intel.com>2013-07-31 20:13:04 +0000
committerMatt Kopec <Matt.Kopec@intel.com>2013-07-31 20:13:04 +0000
commita224c7c673a433ef9f6673929a5eb8508bd8e73d (patch)
treef56cea89c4fd1cc864b47acba97516eeedc37173
parentcae3de0877cb951519f27a88307c81c990910543 (diff)
downloadlldb-a224c7c673a433ef9f6673929a5eb8508bd8e73d.tar.gz
Add the LD_LIBRARY_PATH to target.env-vars for tests expecting libimf.so when testing with ICC.
Patch from Andy Kaylor. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187520 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/lang/c/global_variables/TestGlobalVariables.py7
-rw-r--r--test/lang/c/shared_lib/TestSharedLib.py5
-rw-r--r--test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py5
3 files changed, 14 insertions, 3 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',
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):
diff --git a/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py b/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
index 9cf59da6c..391058a17 100644
--- a/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
+++ b/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.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):