about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--test/Feature/SolverTimeout.c3
-rw-r--r--test/Makefile2
-rw-r--r--test/lit.cfg11
-rw-r--r--test/lit.site.cfg.in2
4 files changed, 17 insertions, 1 deletions
diff --git a/test/Feature/SolverTimeout.c b/test/Feature/SolverTimeout.c
index 2ef6d413..aa86a856 100644
--- a/test/Feature/SolverTimeout.c
+++ b/test/Feature/SolverTimeout.c
@@ -1,6 +1,9 @@
 // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t1.bc
 // RUN: rm -rf %t.klee-out
 // RUN: %klee --output-dir=%t.klee-out --max-solver-time=1 %t1.bc
+// FIXME: This test occasionally fails when using Z3 4.4.1 but
+// not when using Z3 from the master branch. So disable the test for now.
+// REQUIRES: stp
 #include <stdio.h>
 
 int main() {
diff --git a/test/Makefile b/test/Makefile
index 02d0a36f..0b176769 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -82,4 +82,6 @@ lit.site.cfg: lit.site.cfg.in
 	     -e "s#@ENABLE_POSIX_RUNTIME@#$(ENABLE_POSIX_RUNTIME)#g" \
 	     -e "s#@TARGET_TRIPLE@#$(TARGET_TRIPLE)#g" \
 	     -e "s#@HAVE_SELINUX@#$(HAVE_SELINUX)#g" \
+	     -e "s#@ENABLE_STP@#$(ENABLE_STP)#g" \
+	     -e "s#@ENABLE_Z3@#$(ENABLE_Z3)#g" \
 	     $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
diff --git a/test/lit.cfg b/test/lit.cfg
index f1253ea6..fdf9bf7b 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -128,4 +128,13 @@ 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)
-                          
+
+# Solver features
+if config.enable_stp:
+  config.available_features.add('stp')
+else:
+  config.available_features.add('not-stp')
+if config.enable_z3:
+  config.available_features.add('z3')
+else:
+  config.available_features.add('not-z3')
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 8e2d79a4..5aff44ab 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -18,6 +18,8 @@ config.llvmgxx = "@LLVMCXX@"
 config.enable_uclibc = True if @ENABLE_UCLIBC@ == 1 else False
 config.enable_posix_runtime = True if @ENABLE_POSIX_RUNTIME@ == 1 else False
 config.have_selinux = True if @HAVE_SELINUX@ == 1 else False
+config.enable_stp = True if @ENABLE_STP@ == 1 else False
+config.enable_z3 = True if @ENABLE_Z3@ == 1 else False
 
 # Current target
 config.target_triple = "@TARGET_TRIPLE@"