about summary refs log tree commit diff homepage
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index a2c9813a..ccd3b57e 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -105,3 +105,14 @@ for s,basename,extra_args in subs:
 if int(config.llvm_version_major) == 2:
     # This is a hack
     config.substitutions.append(('%T','Output'))
+
+# Add feature for the LLVM version in use, so it can be tested in REQUIRES and
+# XFAIL checks. We also add "not-XXX" variants, for the same reason.
+known_llvm_versions = set(["2.9", "3.4", "3.5"])
+current_llvm_version = "%s.%s" % (config.llvm_version_major,
+                                  config.llvm_version_minor)
+config.available_features.add("llvm-" + current_llvm_version)
+for version in known_llvm_versions:
+   if version != current_llvm_version:
+      config.available_features.add("not-llvm-" + version)
+