about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2017-03-28 08:53:17 +0200
committerDan Liew <delcypher@gmail.com>2017-04-06 11:11:39 +0100
commitdd81784b0de223af32f712b1c2c28d667049be33 (patch)
tree463ce2004aa98f760090f3f78d538cbca9ac3fc2 /test
parent0c95b3ec029d467be1a1b03eca125c0506877201 (diff)
downloadklee-dd81784b0de223af32f712b1c2c28d667049be33.tar.gz
test: lit, add geq/lt-llvm- configs
This is useful for testing ranges. Especially when tests are run on
later LLVM versions.

This code is funny as it uses 2, 3, and 4 spaces for indentation :).

This is extensively used in #605.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/lit.cfg8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index dd2fbc13..1a988863 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -135,8 +135,12 @@ 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)
+  if version != current_llvm_version:
+    config.available_features.add("not-llvm-" + version)
+  if current_llvm_version >= version:
+    config.available_features.add("geq-llvm-" + version)
+  else:
+    config.available_features.add("lt-llvm-" + version)
 
 # Solver features
 if config.enable_stp: