diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-09-13 01:41:18 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-13 01:41:18 +0000 |
| commit | abc5153371a6874a6b93ee5623627ea59fb433a4 (patch) | |
| tree | cd3392a3771ca7527b080d3114cbb294ed776c05 | |
| parent | f8f547ab6da30fa8b8dd7a04aaa7052b1423a2cc (diff) | |
| download | bcm5719-llvm-abc5153371a6874a6b93ee5623627ea59fb433a4.tar.gz bcm5719-llvm-abc5153371a6874a6b93ee5623627ea59fb433a4.zip | |
tests: Add llvm_supports_binding predicate.
llvm-svn: 81664
| -rw-r--r-- | llvm/test/Makefile | 1 | ||||
| -rw-r--r-- | llvm/test/lib/llvm.exp | 12 | ||||
| -rw-r--r-- | llvm/test/lit.cfg | 4 |
3 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Makefile b/llvm/test/Makefile index 813ce57235f..1b3c866f96b 100644 --- a/llvm/test/Makefile +++ b/llvm/test/Makefile @@ -135,6 +135,7 @@ site.exp: FORCE @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 diff --git a/llvm/test/lib/llvm.exp b/llvm/test/lib/llvm.exp index f5ec6f339ea..2c1bef939af 100644 --- a/llvm/test/lib/llvm.exp +++ b/llvm/test/lib/llvm.exp @@ -300,3 +300,15 @@ proc llvm_supports_target { tgtName } { } 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 +} diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg index 546984d972a..7eac5c69759 100644 --- a/llvm/test/lit.cfg +++ b/llvm/test/lit.cfg @@ -99,6 +99,10 @@ langs = set(site_exp['llvmgcc_langs'].split(',')) 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 |

