aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-04 09:38:07 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-04 09:38:07 +0000
commit0ea271c35207d023999fa1f7efbb1652f7779aa5 (patch)
tree3988601c28f01b678ab3d4982af55e9467aaf6e2
parenta857389a7d0dc24e3c89783939232d927391e66e (diff)
Steal the TARGET lit condition from the LLVM test suite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97727 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/lit.cfg12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index beb8ae03b4..3565edc779 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -97,6 +97,18 @@ if config.test_exec_root is None:
###
+import re
+site_exp = {}
+for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
+ m = re.match('set ([^ ]+) "([^"]*)"', line)
+ if m:
+ site_exp[m.group(1)] = m.group(2)
+
+targets = set(site_exp['TARGETS_TO_BUILD'].split())
+def llvm_supports_target(name):
+ return name in targets
+config.conditions['TARGET'] = llvm_supports_target
+
# Discover the 'clang' and 'clangcc' to use.
import os