test/Unit: Fixup lit.cfg to allow running inside test/Unit (with llvm-config in

path).

llvm-svn: 133653
This commit is contained in:
Daniel Dunbar 2011-06-22 21:46:43 +00:00
parent bfae99cf29
commit a60a269e67
1 changed files with 9 additions and 9 deletions

View File

@ -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. # Check that the object root is known.
if config.test_exec_root is None: if config.test_exec_root is None:
# Otherwise, we haven't loaded the site specific configuration (the user is # 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 # Validate that we got a tree which points to here, using the standard
# tools/clang layout. # 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): if os.path.realpath(clang_src_root) != os.path.realpath(this_src_root):
lit.fatal('No site specific configuration available!') 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.note('using out-of-tree build at %r' % clang_obj_root)
lit.load_config(config, site_cfg) lit.load_config(config, site_cfg)
raise SystemExit 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