[cfe-commits] r97727 - /cfe/trunk/test/lit.cfg
John McCall
rjmccall at apple.com
Thu Mar 4 01:38:07 PST 2010
Author: rjmccall
Date: Thu Mar 4 03:38:07 2010
New Revision: 97727
URL: http://llvm.org/viewvc/llvm-project?rev=97727&view=rev
Log:
Steal the TARGET lit condition from the LLVM test suite.
Modified:
cfe/trunk/test/lit.cfg
Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=97727&r1=97726&r2=97727&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Thu Mar 4 03:38:07 2010
@@ -97,6 +97,18 @@
###
+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
More information about the cfe-commits
mailing list