diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-02 00:39:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-02 00:39:42 +0000 |
commit | 04c33a84da398c570eb3f9acea16e9364b7bf24a (patch) | |
tree | 98e5f48f16faf1ddf8b27f8c0bceaf14ebba4905 /utils/llvm-lit/llvm-lit.in | |
parent | 368436aef2d49dc5e8b4597779f4aeb506248258 (diff) | |
download | external_llvm-04c33a84da398c570eb3f9acea16e9364b7bf24a.zip external_llvm-04c33a84da398c570eb3f9acea16e9364b7bf24a.tar.gz external_llvm-04c33a84da398c570eb3f9acea16e9364b7bf24a.tar.bz2 |
tests: Add an 'llvm-lit' tool (script), which gets generated as part of the
build and has the object build directory baked into it. This allows 'llvm-lit'
to properly find the information needed to run the test suite in all cases,
without requiring the user to have LLVM or 'lit' available in their PATH, for
example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/llvm-lit/llvm-lit.in')
-rw-r--r-- | utils/llvm-lit/llvm-lit.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/utils/llvm-lit/llvm-lit.in b/utils/llvm-lit/llvm-lit.in new file mode 100644 index 0000000..3ff2c24 --- /dev/null +++ b/utils/llvm-lit/llvm-lit.in @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +import os +import sys + +# Variables configured at build time. +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')) + +# Set up some builtin parameters, so that by default the LLVM test suite +# configuration file knows how to find the object tree. +builtin_parameters = { + 'llvm_site_config' : os.path.join(llvm_obj_root, 'test', 'lit.site.cfg') + } + +if __name__=='__main__': + import lit + lit.main(builtin_parameters) |