[llvm-commits] [llvm] r110000 - in /llvm/trunk/utils: Makefile llvm-lit/ llvm-lit/Makefile llvm-lit/llvm-lit.in
Daniel Dunbar
daniel at zuster.org
Sun Aug 1 17:39:42 PDT 2010
Author: ddunbar
Date: Sun Aug 1 19:39:42 2010
New Revision: 110000
URL: http://llvm.org/viewvc/llvm-project?rev=110000&view=rev
Log:
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.
Added:
llvm/trunk/utils/llvm-lit/
llvm/trunk/utils/llvm-lit/Makefile
llvm/trunk/utils/llvm-lit/llvm-lit.in
Modified:
llvm/trunk/utils/Makefile
Modified: llvm/trunk/utils/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/Makefile?rev=110000&r1=109999&r2=110000&view=diff
==============================================================================
--- llvm/trunk/utils/Makefile (original)
+++ llvm/trunk/utils/Makefile Sun Aug 1 19:39:42 2010
@@ -8,7 +8,8 @@
##===----------------------------------------------------------------------===##
LEVEL = ..
-PARALLEL_DIRS := TableGen fpcmp PerfectShuffle FileCheck FileUpdate count not unittest
+PARALLEL_DIRS := FileCheck FileUpdate TableGen PerfectShuffle \
+ count fpcmp llvm-lit not unittest
EXTRA_DIST := cgiplotNLT.pl check-each-file codegen-diff countloc.sh cvsupdate \
DSAclean.py DSAextract.py emacs findsym.pl GenLibDeps.pl \
Added: llvm/trunk/utils/llvm-lit/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-lit/Makefile?rev=110000&view=auto
==============================================================================
--- llvm/trunk/utils/llvm-lit/Makefile (added)
+++ llvm/trunk/utils/llvm-lit/Makefile Sun Aug 1 19:39:42 2010
@@ -0,0 +1,21 @@
+##===- utils/llvm-lit/Makefile -----------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../..
+
+include $(LEVEL)/Makefile.common
+
+all:: $(ToolDir)/llvm-lit
+
+$(ToolDir)/llvm-lit: llvm-lit.in $(ObjDir)/.dir
+ $(Echo) "Creating 'llvm-lit' script..."
+ $(Verb)sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \
+ -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \
+ $< > $@
+ $(Verb)chmod +x $@
Added: llvm/trunk/utils/llvm-lit/llvm-lit.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm-lit/llvm-lit.in?rev=110000&view=auto
==============================================================================
--- llvm/trunk/utils/llvm-lit/llvm-lit.in (added)
+++ llvm/trunk/utils/llvm-lit/llvm-lit.in Sun Aug 1 19:39:42 2010
@@ -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)
More information about the llvm-commits
mailing list