diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2020-02-08 18:36:35 +0100 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2020-03-02 16:03:53 +0000 |
commit | 0fd6ee46a9998fa894eaf5bcd2cc779ea8d7216e (patch) | |
tree | 8714b2d7923452b45d4c12bce8622720c400776f /test | |
parent | 3cf8c8ba74f6d17fc07c1ed86b9c86ed6489217c (diff) | |
download | klee-0fd6ee46a9998fa894eaf5bcd2cc779ea8d7216e.tar.gz |
fix lit.cfg: numerical comparison of LLVM version numbers
Diffstat (limited to 'test')
-rw-r--r-- | test/lit.cfg | 7 |
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) |