From: Daniel Dunbar Date: Wed, 22 Jun 2011 21:46:43 +0000 (+0000) Subject: test/Unit: Fixup lit.cfg to allow running inside test/Unit (with llvm-config in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9c7f469318c42c9813be9ac165aaa183d2de7d72;p=clang 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 --- 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