diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-01-12 19:47:12 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-01-20 13:21:31 +0000 |
commit | 2cfdfe0ddc88c8ec9619c37fd207778dcf2824e2 (patch) | |
tree | cf598d6fbf7598922a7f3059c7e7f486a8b53cef | |
parent | 32b0d6bac1a00afb948d64eb0e6390a31f7d8d92 (diff) | |
download | klee-2cfdfe0ddc88c8ec9619c37fd207778dcf2824e2.tar.gz |
Add LLVM tool directory to PATH when running tests with llvm-lit.
This is needed because the helper tool 'not' is used by some tests
-rw-r--r-- | test/Makefile | 1 | ||||
-rw-r--r-- | test/lit.cfg | 9 | ||||
-rw-r--r-- | test/lit.site.cfg.in | 1 |
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") |