[llvm-commits] [llvm] r125176 - /llvm/trunk/test/lit.cfg

NAKAMURA Takumi geek4civic at gmail.com
Tue Feb 8 20:19:21 PST 2011


Author: chapuni
Date: Tue Feb  8 22:19:21 2011
New Revision: 125176

URL: http://llvm.org/viewvc/llvm-project?rev=125176&view=rev
Log:
test/lit.cfg: Seek sane tools(and bash) in directories and set to $PATH.

LitConfig.getBashPath() will not seek in $PATH after LitConfig.getToolsPath() was executed.

Modified:
    llvm/trunk/test/lit.cfg

Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=125176&r1=125175&r2=125176&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Tue Feb  8 22:19:21 2011
@@ -19,6 +19,18 @@
 # test_source_root: The root path where tests are located.
 config.test_source_root = os.path.dirname(__file__)
 
+# Tweak PATH for Win32
+if sys.platform in ['win32']:
+    # Seek sane tools in directories and set to $PATH.
+    path = getattr(config, 'lit_tools_dir', None)
+    path = lit.getToolsPath(path,
+                            config.environment['PATH'],
+                            ['cmp.exe', 'grep.exe', 'sed.exe'])
+    if path is not None:
+        path = os.path.pathsep.join((path,
+                                     config.environment['PATH']))
+        config.environment['PATH'] = path
+
 # test_exec_root: The root path where tests should be run.
 llvm_obj_root = getattr(config, 'llvm_obj_root', None)
 if llvm_obj_root is not None:
@@ -273,7 +285,7 @@
 ### Features
 
 # Shell execution
-if sys.platform not in ['win32']:
+if sys.platform not in ['win32'] or lit.getBashPath() != '':
     config.available_features.add('shell')
 
 # Loadable module





More information about the llvm-commits mailing list