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

NAKAMURA Takumi geek4civic at gmail.com
Mon Jul 2 20:59:34 PDT 2012


Author: chapuni
Date: Mon Jul  2 22:59:34 2012
New Revision: 159641

URL: http://llvm.org/viewvc/llvm-project?rev=159641&view=rev
Log:
llvm/test/lit.cfg: Retweak for Win32 to fix testing.

  - execute_external should be;
    - Not on Win32.
    - Using bash.
    In reverse, "execute_internal" shoud be (Win32 && !bash).

  - lit.getBashPath() behaves differently before and after tweaking $PATH.

I will add a few explanations there later.

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=159641&r1=159640&r2=159641&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Mon Jul  2 22:59:34 2012
@@ -9,8 +9,20 @@
 # name: The name of this test suite.
 config.name = 'LLVM'
 
+# Tweak PATH for Win32 to decide to use bash.exe or not.
+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
+
 # testFormat: The test format to use to interpret tests.
-execute_external = (sys.platform in ['win32']
+execute_external = (not sys.platform in ['win32']
                     or lit.getBashPath() not in [None, ""])
 config.test_format = lit.formats.ShTest(execute_external)
 
@@ -29,18 +41,6 @@
 # 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:





More information about the llvm-commits mailing list