summaryrefslogtreecommitdiff
path: root/utils/llvm-lit
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-04-19 16:31:08 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-04-19 16:31:08 +0000
commit90275ea2ee7c7a960a3567926140b26a526b0aa1 (patch)
treee45707c745d8b515f6500301812f78fd2305d966 /utils/llvm-lit
parenta4b00b2db79bb97d29bf6b6e55322a70150527a6 (diff)
downloadllvm-90275ea2ee7c7a960a3567926140b26a526b0aa1.tar.gz
llvm-90275ea2ee7c7a960a3567926140b26a526b0aa1.tar.bz2
llvm-90275ea2ee7c7a960a3567926140b26a526b0aa1.tar.xz
llvm-lit: Inject the lit module path at the beginning of sys.path, just in case
the user has another lit somewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvm-lit')
-rwxr-xr-xutils/llvm-lit/llvm-lit.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/llvm-lit/llvm-lit.in b/utils/llvm-lit/llvm-lit.in
index 1df1747a1c..879d18bdc8 100755
--- a/utils/llvm-lit/llvm-lit.in
+++ b/utils/llvm-lit/llvm-lit.in
@@ -8,7 +8,7 @@ llvm_source_root = "@LLVM_SOURCE_DIR@"
llvm_obj_root = "@LLVM_BINARY_DIR@"
# Make sure we can find the lit package.
-sys.path.append(os.path.join(llvm_source_root, 'utils', 'lit'))
+sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
# Set up some builtin parameters, so that by default the LLVM test suite
# configuration file knows how to find the object tree.
@@ -18,7 +18,8 @@ builtin_parameters = {
'llvm_site_config' : os.path.join(llvm_obj_root, 'test', 'lit.site.cfg')
}
-clang_site_config = os.path.join(llvm_obj_root, 'tools', 'clang', 'test', 'lit.site.cfg')
+clang_site_config = os.path.join(llvm_obj_root, 'tools', 'clang', 'test',
+ 'lit.site.cfg')
if os.path.exists(clang_site_config):
builtin_parameters['clang_site_config'] = clang_site_config