diff options
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r-- | cpp/config/TestUtil.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index 5d538f3343d..30bdca160d8 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -326,6 +326,18 @@ def printOutputFromPipe(pipe): break os.write(1, c) +def addLdPath(path): + if isWin32(): + if isCygwin(): + os.environ["PATH"] = path + ":" + os.getenv("PATH", "") + else: + os.environ["PATH"] = path + ";" + os.getenv("PATH", "") + elif isAIX(): + os.environ["LIBPATH"] = path + ":" + os.getenv("LIBPATH", "") + else: + os.environ["LD_LIBRARY_PATH"] = path + ":" + os.getenv("LD_LIBRARY_PATH", "") + os.environ["LD_LIBRARY_PATH_64"] = path + ":" + os.getenv("LD_LIBRARY_PATH_64", "") + for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): |