diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2017-01-14 17:55:07 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2017-01-14 21:37:19 +0000 |
commit | 3c8cb4600392675a34f2505f630523a494844d3d (patch) | |
tree | bbe0cf8b9d2e369175ad03020d7bdb47e9e11aa9 /test/lit.cfg | |
parent | 23e656156e4790a06a295d48932db53f2a582227 (diff) | |
download | klee-3c8cb4600392675a34f2505f630523a494844d3d.tar.gz |
Write tests to test `libkleeRuntest`. The `replay_posix_runtime.c`
test is marked XFAIL because there is a bug in the implementation of `libkleeRuntest`. Quite a few changes had to be made to the lit configuration in order to support these tests. To run the tests I had to fix #480 for the autoconf/Makefile build system otherwise the `libkleeRuntest` library would not be found by the system linker at runtime.
Diffstat (limited to 'test/lit.cfg')
-rw-r--r-- | test/lit.cfg | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index 39d23fc5..31552882 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -76,7 +76,7 @@ if config.test_exec_root is None: # Add substitutions from lit.site.cfg -subs = [ 'llvmgcc', 'llvmgxx'] +subs = [ 'llvmgcc', 'llvmgxx', 'cc', 'cxx'] for name in subs: value = getattr(config, name, None) if value == None: @@ -90,6 +90,10 @@ config.substitutions.append( ('%llvmas', os.path.join(llvm_tools_dir, 'llvm-as') # Add a substitution for llvm-ar config.substitutions.append( ('%llvmar', os.path.join(llvm_tools_dir, 'llvm-ar')) ) +# Add a substition for libkleeruntest +config.substitutions.append( ('%libkleeruntestdir', os.path.dirname(config.libkleeruntest)) ) +config.substitutions.append( ('%libkleeruntest', config.libkleeruntest) ) + # Get KLEE and Kleaver specific parameters passed on llvm-lit cmd line # e.g. llvm-lit --param klee_opts=--help try: @@ -107,7 +111,10 @@ if len(kleaver_extra_params) != 0: print("Passing extra Kleaver command line args: {0}".format(kleaver_extra_params)) # Set absolute paths and extra cmdline args for KLEE's tools -subs = [ ('%kleaver', 'kleaver', kleaver_extra_params), ('%klee','klee', klee_extra_params) ] +subs = [ ('%kleaver', 'kleaver', kleaver_extra_params), + ('%klee','klee', klee_extra_params), + ('%ktest-tool', 'ktest-tool', '') +] for s,basename,extra_args in subs: config.substitutions.append( ( s, "{0} {1}".format( os.path.join(klee_tools_dir, basename), extra_args ).strip() @@ -140,3 +147,7 @@ if config.enable_z3: config.available_features.add('z3') else: config.available_features.add('not-z3') + +# POSIX runtime feature +if config.enable_posix_runtime: + config.available_features.add('posix-runtime') |