summaryrefslogtreecommitdiff
path: root/test/Unit
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-06-22 21:46:43 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-06-22 21:46:43 +0000
commit9c7f469318c42c9813be9ac165aaa183d2de7d72 (patch)
treea37fb8863dfe294fb1dc22dd1420d9d117fa902e /test/Unit
parent9d96bce991048fd2337cf058ec6a6a722207cbf2 (diff)
downloadclang-9c7f469318c42c9813be9ac165aaa183d2de7d72.tar.gz
test/Unit: Fixup lit.cfg to allow running inside test/Unit (with llvm-config in
path). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Unit')
-rw-r--r--test/Unit/lit.cfg18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg
index 794234ce55..8f27781523 100644
--- a/test/Unit/lit.cfg
+++ b/test/Unit/lit.cfg
@@ -30,14 +30,6 @@ if 'TEMP' in os.environ:
###
-# 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 @@ if config.test_exec_root is None:
# 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 @@ if config.test_exec_root is None:
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