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

Tobias Grosser grosser at fim.uni-passau.de
Tue Jan 4 08:01:17 PST 2011


Author: grosser
Date: Tue Jan  4 10:01:17 2011
New Revision: 122810

URL: http://llvm.org/viewvc/llvm-project?rev=122810&view=rev
Log:
Include llvm-gcc dir before llvm_tools_dir

This ensures that always the recently compiled tools are picked for testing.

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=122810&r1=122809&r2=122810&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Tue Jan  4 10:01:17 2011
@@ -27,6 +27,18 @@
 # Tweak the PATH to include the scripts dir, the tools dir, and the llvm-gcc bin
 # dir (if available).
 if llvm_obj_root is not None:
+    # Include llvm-gcc first, as the llvm-gcc binaryies will not appear
+    # neither in the tools nor in the scripts dir. However it might be
+    # possible, that some old llvm tools are in the llvm-gcc dir. Adding
+    # llvm-gcc dir first ensures, that those will always be overwritten
+    # by the new tools in llvm_tools_dir. So now outdated tools are used
+      # for testing
+    llvmgcc_dir = getattr(config, 'llvmgcc_dir', None)
+    if llvmgcc_dir:
+        path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'),
+                                     config.environment['PATH']))
+        config.environment['PATH'] = path
+
     llvm_src_root = getattr(config, 'llvm_src_root', None)
     if not llvm_src_root:
         lit.fatal('No LLVM source root set!')
@@ -41,12 +53,6 @@
     path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
     config.environment['PATH'] = path
 
-    llvmgcc_dir = getattr(config, 'llvmgcc_dir', None)
-    if llvmgcc_dir:
-        path = os.path.pathsep.join((os.path.join(llvmgcc_dir, 'bin'),
-                                     config.environment['PATH']))
-        config.environment['PATH'] = path
-
 # Propagate 'HOME' through the environment.
 if 'HOME' in os.environ:
     config.environment['HOME'] = os.environ['HOME']





More information about the llvm-commits mailing list