You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ja...@apache.org on 2015/02/06 23:02:19 UTC

[2/7] trafficserver-qa git commit: Add Mac support to shell_env()

Add Mac support to shell_env()


Project: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/commit/692d1d83
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/tree/692d1d83
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver-qa/diff/692d1d83

Branch: refs/heads/master
Commit: 692d1d83d1eb731ef144d9072f6732fc78427b99
Parents: 7339d9e
Author: Thomas Jackson <ja...@gmail.com>
Authored: Tue Jan 27 15:26:11 2015 -0800
Committer: Thomas Jackson <ja...@gmail.com>
Committed: Tue Jan 27 15:26:11 2015 -0800

----------------------------------------------------------------------
 tsqa/environment.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver-qa/blob/692d1d83/tsqa/environment.py
----------------------------------------------------------------------
diff --git a/tsqa/environment.py b/tsqa/environment.py
index 9e166ab..c11ac2d 100644
--- a/tsqa/environment.py
+++ b/tsqa/environment.py
@@ -228,10 +228,14 @@ class Environment:
         environ = copy.copy(os.environ)
         environ['TS_ROOT'] = self.layout.prefix
 
-        if environ.has_key('LD_LIBRARY_PATH') and self.layout.libdir not in environ['LD_LIBRARY_PATH'].split(':'):
-            environ['LD_LIBRARY_PATH'] = self.layout.libdir + ':' + environ['LD_LIBRARY_PATH']
-        else:
-            environ['LD_LIBRARY_PATH'] = self.layout.libdir
+        for env_key in ('LD_LIBRARY_PATH',  # for *nix
+                        'DYLD_LIBRARY_PATH',  # for mac
+                        ):
+            if environ.has_key(env_key) and self.layout.libdir not in environ[env_key].split(':'):
+                environ[env_key] = self.layout.libdir + ':' + environ[env_key]
+            else:
+                environ[env_key] = self.layout.libdir
+
         return environ
 
     def __exec_cop(self):