about summary refs log tree commit diff homepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Makefile1
-rw-r--r--test/lit.cfg9
-rw-r--r--test/lit.site.cfg.in1
3 files changed, 10 insertions, 1 deletions
diff --git a/test/Makefile b/test/Makefile
index 75e05dda..b2cc0210 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -114,4 +114,5 @@ lit.site.cfg: site.exp
 	@sed -e "s#@KLEE_SOURCE_DIR@#$(PROJ_SRC_ROOT)#g" \
 	     -e "s#@KLEE_BINARY_DIR@#$(PROJ_OBJ_ROOT)#g" \
 	     -e "s#@KLEE_TOOLS_DIR@#$(ToolDir)#g" \
+	     -e "s#@LLVM_TOOLS_DIR@#$(LLVMToolDir)#g" \
 	     $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
diff --git a/test/lit.cfg b/test/lit.cfg
index c2144d43..e8dca065 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -22,12 +22,19 @@ klee_obj_root = getattr(config, 'klee_obj_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:
     klee_tools_dir = getattr(config, 'klee_tools_dir', None)
     if not klee_tools_dir:
         lit.fatal('No KLEE tools dir set!')
-    path = os.path.pathsep.join((klee_tools_dir, config.environment['PATH']))
+
+    # Check LLVM tool directory
+    llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
+    if not llvm_tools_dir:
+        lit.fatal('No LLVM tool directory set!')
+
+    path = os.path.pathsep.join((klee_tools_dir, config.environment['PATH'], llvm_tools_dir))
     config.environment['PATH'] = path
 
 # Propogate 'HOME' through the environment.
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index ec92b32d..f47d63b8 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -3,6 +3,7 @@
 config.klee_src_root = "@KLEE_SOURCE_DIR@"
 config.klee_obj_root = "@KLEE_BINARY_DIR@"
 config.klee_tools_dir = "@KLEE_TOOLS_DIR@"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
 
 # Let the main config do the real work.
 lit.load_config(config, "@KLEE_SOURCE_DIR@/test/lit.cfg")