Skip to content

Commit

Permalink
llvm-lit: Inject the lit module path at the beginning of sys.path, ju…
Browse files Browse the repository at this point in the history
…st 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
  • Loading branch information
ddunbar committed Apr 19, 2012
1 parent a4b00b2 commit 90275ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/llvm-lit/llvm-lit.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down

0 comments on commit 90275ea

Please sign in to comment.