mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 06:40:01 +08:00
Add the LD_LIBRARY_PATH to target.env-vars for tests expecting libimf.so when testing with ICC.
Patch from Andy Kaylor. llvm-svn: 187520
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user