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 | a19db3594f9d8cfe8563a8f5fe8a89cd3194fa24 (patch) | |
tree | 061ea32193e73927aa113fd37d642e10c1dc22b0 /llvm/utils/llvm-lit/llvm-lit.in | |
parent | 38a867aca6090dfa0ad045ed3f3051c219f97275 (diff) | |
download | bcm5719-llvm-a19db3594f9d8cfe8563a8f5fe8a89cd3194fa24.tar.gz bcm5719-llvm-a19db3594f9d8cfe8563a8f5fe8a89cd3194fa24.zip |
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.
llvm-svn: 110000
Diffstat (limited to 'llvm/utils/llvm-lit/llvm-lit.in')
-rw-r--r-- | llvm/utils/llvm-lit/llvm-lit.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/utils/llvm-lit/llvm-lit.in b/llvm/utils/llvm-lit/llvm-lit.in new file mode 100644 index 00000000000..3ff2c2489c4 --- /dev/null +++ b/llvm/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) |