[llvm-commits] [llvm] r81664 - in /llvm/trunk/test: Makefile lib/llvm.exp lit.cfg

Daniel Dunbar daniel at zuster.org
Sat Sep 12 18:41:18 PDT 2009


Author: ddunbar
Date: Sat Sep 12 20:41:18 2009
New Revision: 81664

URL: http://llvm.org/viewvc/llvm-project?rev=81664&view=rev
Log:
tests: Add llvm_supports_binding predicate.

Modified:
    llvm/trunk/test/Makefile
    llvm/trunk/test/lib/llvm.exp
    llvm/trunk/test/lit.cfg

Modified: llvm/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=81664&r1=81663&r2=81664&view=diff

==============================================================================
--- llvm/trunk/test/Makefile (original)
+++ llvm/trunk/test/Makefile Sat Sep 12 20:41:18 2009
@@ -135,6 +135,7 @@
 	@echo 'set llvmgcc_version "$(LLVMGCC_VERSION)"' >> site.tmp
 	@echo 'set llvmtoolsdir "$(ToolDir)"' >>site.tmp
 	@echo 'set llvmlibsdir "$(LibDir)"' >>site.tmp
+	@echo 'set llvm_bindings "$(BINDINGS_TO_BUILD)"' >> site.tmp
 	@echo 'set srcroot "$(LLVM_SRC_ROOT)"' >>site.tmp
 	@echo 'set objroot "$(LLVM_OBJ_ROOT)"' >>site.tmp
 	@echo 'set srcdir "$(LLVM_SRC_ROOT)/test"' >>site.tmp

Modified: llvm/trunk/test/lib/llvm.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lib/llvm.exp?rev=81664&r1=81663&r2=81664&view=diff

==============================================================================
--- llvm/trunk/test/lib/llvm.exp (original)
+++ llvm/trunk/test/lib/llvm.exp Sat Sep 12 20:41:18 2009
@@ -300,3 +300,15 @@
   }
   return 0
 }
+
+# This procedure provides an interface to check the BINDINGS_TO_BUILD makefile
+# variable to see if a particular binding has been configured to build.
+proc llvm_supports_binding { name } {
+  global llvm_bindings
+  foreach item [split $llvm_bindings] {
+    if { [regexp $name $item match] } {
+      return 1
+    }
+  }
+  return 0
+}

Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=81664&r1=81663&r2=81664&view=diff

==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Sat Sep 12 20:41:18 2009
@@ -99,6 +99,10 @@
 def llvm_gcc_supports(name):
     return name in langs
 
+bindings = set(site_exp['llvm_bindings'].split(','))
+def llvm_supports_binding(name):
+    return name in langs
+
 # Provide on_clone hook for reading 'dg.exp'.
 import os
 simpleLibData = re.compile(r"""load_lib llvm.exp





More information about the llvm-commits mailing list