[cfe-commits] r133653 - /cfe/trunk/test/Unit/lit.cfg

Daniel Dunbar daniel at zuster.org
Wed Jun 22 14:46:43 PDT 2011


Author: ddunbar
Date: Wed Jun 22 16:46:43 2011
New Revision: 133653

URL: http://llvm.org/viewvc/llvm-project?rev=133653&view=rev
Log:
test/Unit: Fixup lit.cfg to allow running inside test/Unit (with llvm-config in
path).

Modified:
    cfe/trunk/test/Unit/lit.cfg

Modified: cfe/trunk/test/Unit/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Unit/lit.cfg?rev=133653&r1=133652&r2=133653&view=diff
==============================================================================
--- cfe/trunk/test/Unit/lit.cfg (original)
+++ cfe/trunk/test/Unit/lit.cfg Wed Jun 22 16:46:43 2011
@@ -30,14 +30,6 @@
 
 ###
 
-# If necessary, point the dynamic loader at libLLVM.so.
-if config.enable_shared:
-    shlibpath = config.environment.get(config.shlibpath_var,'')
-    if shlibpath:
-        shlibpath = os.pathsep + shlibpath
-    shlibpath = config.shlibdir + shlibpath
-    config.environment[config.shlibpath_var] = shlibpath
-
 # Check that the object root is known.
 if config.test_exec_root is None:
     # Otherwise, we haven't loaded the site specific configuration (the user is
@@ -71,7 +63,7 @@
 
     # Validate that we got a tree which points to here, using the standard
     # tools/clang layout.
-    this_src_root = os.path.dirname(config.test_source_root)
+    this_src_root = os.path.join(os.path.dirname(__file__),'..','..')
     if os.path.realpath(clang_src_root) != os.path.realpath(this_src_root):
         lit.fatal('No site specific configuration available!')
 
@@ -84,3 +76,11 @@
     lit.note('using out-of-tree build at %r' % clang_obj_root)
     lit.load_config(config, site_cfg)
     raise SystemExit
+
+# If necessary, point the dynamic loader at libLLVM.so.
+if config.enable_shared:
+    shlibpath = config.environment.get(config.shlibpath_var,'')
+    if shlibpath:
+        shlibpath = os.pathsep + shlibpath
+    shlibpath = config.shlibdir + shlibpath
+    config.environment[config.shlibpath_var] = shlibpath





More information about the cfe-commits mailing list