diff options
-rw-r--r-- | test/Makefile | 1 | ||||
-rw-r--r-- | test/lit.cfg | 11 | ||||
-rw-r--r-- | test/lit.site.cfg.in | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile index 6be82442..31896075 100644 --- a/test/Makefile +++ b/test/Makefile @@ -76,6 +76,7 @@ lit.site.cfg: lit.site.cfg.in -e "s#@KLEE_TOOLS_DIR@#$(ToolDir)#g" \ -e "s#@LLVM_TOOLS_DIR@#$(LLVMToolDir)#g" \ -e "s#@LLVM_VERSION_MAJOR@#$(LLVM_VERSION_MAJOR)#g" \ + -e "s#@LLVM_VERSION_MINOR@#$(LLVM_VERSION_MINOR)#g" \ -e "s#@LLVMCC@#$(KLEE_BITCODE_C_COMPILER) -I$(PROJ_SRC_ROOT)/include#g" \ -e "s#@LLVMCXX@#$(KLEE_BITCODE_CXX_COMPILER) -I$(PROJ_SRC_ROOT)/include#g" \ -e "s#@ENABLE_UCLIBC@#$(ENABLE_UCLIBC)#g" \ 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) + diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 14ba94e6..8e2d79a4 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -7,6 +7,7 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" # Needed to check if a hack needs to be applied config.llvm_version_major = "@LLVM_VERSION_MAJOR@" +config.llvm_version_minor = "@LLVM_VERSION_MINOR@" # Compilers # FIXME: use llvmcc not llvmgcc |