about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
authorFelix Rath <felix.rath@comsys.rwth-aachen.de>2019-07-29 11:45:48 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2019-07-30 12:38:57 +0100
commiteef4fc08530f357cc49109dc738f1ab4c519a42c (patch)
treed838a0e970a0b9d9272080821ff9df6a54dadc05 /test
parent7547a1a17d93e68b62b942253e0c14fd324d1b75 (diff)
downloadklee-eef4fc08530f357cc49109dc738f1ab4c519a42c.tar.gz
fix two test issues
* Add 'uclibc'-feature for testing if it is enabled
  * -> allow tests to depend on uclibc-availability
* ENABLE_UCLIBC was redundant, use SUPPORT_KLEE_UCLIBC instead
* Cleaned up 'libcxx'-feature availability detection
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt5
-rw-r--r--test/lit.cfg6
-rw-r--r--test/lit.site.cfg.in2
3 files changed, 6 insertions, 7 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 8b6703d4..30ccf6b2 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -17,11 +17,6 @@ set(LLVMCXX "${LLVMCXX} -I${CMAKE_SOURCE_DIR}/include")
 set(NATIVE_CC "${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -I ${CMAKE_SOURCE_DIR}/include")
 set(NATIVE_CXX "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -I ${CMAKE_SOURCE_DIR}/include")
 set(TARGET_TRIPLE "${TARGET_TRIPLE}")
-if (ENABLE_KLEE_UCLIBC)
-  set(ENABLE_UCLIBC 1)
-else()
-  set(ENABLE_UCLIBC 0)
-endif()
 
 # FIXME: Do this to avoid changing the template file that
 # is shared by both build systems.
diff --git a/test/lit.cfg b/test/lit.cfg
index fb479a86..0942a057 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -186,13 +186,17 @@ else:
 # Zlib
 config.available_features.add('zlib' if config.enable_zlib else 'not-zlib')
 
+# Uclibc
+if config.enable_uclibc:
+  config.available_features.add('uclibc')
+
 # POSIX runtime feature
 if config.enable_posix_runtime:
   config.available_features.add('posix-runtime')
 
 # LibC++ runtime feature
 if config.enable_libcxx:
-  config.available_features.add('{}libcxx'.format('' if config.enable_libcxx else 'not-'))
+  config.available_features.add('libcxx')
 
 # Target operating system features
 supported_targets = ['linux', 'darwin', 'freebsd']
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 6ee041d1..99c82bb8 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -29,7 +29,7 @@ if @LLVM_VERSION_MAJOR@ >= 5:
   config.O0opt += " -Xclang -disable-O0-optnone"
 
 # Features
-config.enable_uclibc = True if @ENABLE_UCLIBC@ == 1 else False
+config.enable_uclibc = True if @SUPPORT_KLEE_UCLIBC@ == 1 else False
 config.enable_posix_runtime = True if @ENABLE_POSIX_RUNTIME@ == 1 else False
 config.enable_libcxx = True if @SUPPORT_KLEE_LIBCXX@ == 1 else False
 config.have_selinux = True if @HAVE_SELINUX@ == 1 else False