about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit.cfg7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index fdb971f5..86b65d7f 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -156,8 +156,8 @@ config.substitutions.append(
 # 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(["3.8", "3.9", "4.0", "5.0", "6.0", "7.0", "7.1", "8.0", "9.0", "10.0"])
-current_llvm_version = "%s.%s" % (config.llvm_version_major,
-                                  config.llvm_version_minor)
+current_llvm_version_tuple = (int(config.llvm_version_major), int(config.llvm_version_minor))
+current_llvm_version = "%s.%s" % current_llvm_version_tuple
 
 if current_llvm_version not in known_llvm_versions:
   lit_config.fatal("LLVM Version %s is not listed in known_llvm_versions!"
@@ -165,9 +165,10 @@ if current_llvm_version not in known_llvm_versions:
 
 config.available_features.add("llvm-" + current_llvm_version)
 for version in known_llvm_versions:
+  version_tuple = tuple(int(v) for v in version.split("."))
   if version != current_llvm_version:
     config.available_features.add("not-llvm-" + version)
-  if current_llvm_version >= version:
+  if current_llvm_version_tuple >= version_tuple:
     config.available_features.add("geq-llvm-" + version)
   else:
     config.available_features.add("lt-llvm-" + version)