about summary refs log tree commit diff homepage
path: root/test/lit.cfg
diff options
context:
space:
mode:
authorLukas Zaoral <lzaoral@redhat.com>2021-04-13 15:30:23 +0200
committerCristian Cadar <c.cadar@imperial.ac.uk>2021-04-18 18:34:39 +0100
commitd309c4fa0ca2cd55e36cf1462b9057d6eb97a297 (patch)
tree3f14da778b58b906e7092485bdc7e1357c3a992f /test/lit.cfg
parent292600cf54d5fd73278f67a4f98c2f955cbdaa10 (diff)
downloadklee-d309c4fa0ca2cd55e36cf1462b9057d6eb97a297.tar.gz
tests: Do not add klee tools to PATH in lit
It may happen that some older instance of klee is already present
in PATH.  All tests that call plain klee instead of %klee may use
it and then unexpectedly fail.

This commit will make all tests that rely on klee tools being
explicitly in PATH fail in our CI.  From now on, only LLVM tools,
FileCheck and not will be in lit's PATH.
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 6a02daee..a195a1dc 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -35,21 +35,21 @@ klee_src_root = getattr(config, 'klee_src_root', None)
 if klee_obj_root is not None:
   config.test_exec_root = os.path.join(klee_obj_root, 'test')
 
-# Tweak the PATH to include the tool dir.
-if klee_obj_root is not None:
+  # Check KLEE tools directory
   klee_tools_dir = getattr(config, 'klee_tools_dir', None)
   if not klee_tools_dir:
     lit_config.fatal('No KLEE tools dir set!')
 
-  # Check LLVM tool directory
+  # Check LLVM tools directory
   llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
   if not llvm_tools_dir:
-    lit_config.fatal('No LLVM tool directory set!')
+    lit_config.fatal('No LLVM tools directory set!')
 
+  # Add LLVM tools and FileCheck with not to PATH
   path = os.path.pathsep.join(
     (
+      os.path.join(klee_tools_dir, "testtools"),
       llvm_tools_dir,
-      klee_tools_dir,
       config.environment['PATH']
     )
   )