aboutsummaryrefslogtreecommitdiffstats
path: root/utils/llvm-lit/llvm-lit.in
diff options
context:
space:
mode:
Diffstat (limited to 'utils/llvm-lit/llvm-lit.in')
-rw-r--r--utils/llvm-lit/llvm-lit.in21
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)