[llvm] r193471 - self.path may be empty or otherwise miss the normal system directories,

Joerg Sonnenberger joerg at bec.de
Sat Oct 26 06:25:45 PDT 2013


Author: joerg
Date: Sat Oct 26 08:25:45 2013
New Revision: 193471

URL: http://llvm.org/viewvc/llvm-project?rev=193471&view=rev
Log:
self.path may be empty or otherwise miss the normal system directories,
so try PATH next. Assume it is sane enough to cover the usual system
bash locations too, but the old list is not good enough for NetBSD.

Modified:
    llvm/trunk/utils/lit/lit/LitConfig.py

Modified: llvm/trunk/utils/lit/lit/LitConfig.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/LitConfig.py?rev=193471&r1=193470&r2=193471&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/LitConfig.py (original)
+++ llvm/trunk/utils/lit/lit/LitConfig.py Sat Oct 26 08:25:45 2013
@@ -73,11 +73,7 @@ class LitConfig:
 
         self.bashPath = lit.util.which('bash', os.pathsep.join(self.path))
         if self.bashPath is None:
-            # Check some known paths.
-            for path in ('/bin/bash', '/usr/bin/bash', '/usr/local/bin/bash'):
-                if os.path.exists(path):
-                    self.bashPath = path
-                    break
+            self.bashPath = lit.util.which('bash')
 
         if self.bashPath is None:
             self.warning("Unable to find 'bash'.")





More information about the llvm-commits mailing list