diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-02-04 19:56:57 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2014-02-04 19:56:57 +0000 |
commit | f629a6d1ec51b39334c78bce354b3efb245c35b3 (patch) | |
tree | eaaf3c1339782a6fb2536821af0b6e195dfcfa69 /test/lit.cfg | |
parent | 499a6c2133692846d4547c2c9409978a15bf5d9a (diff) | |
download | klee-f629a6d1ec51b39334c78bce354b3efb245c35b3.tar.gz |
Explicitly propagate CPLUS_INCLUDE_PATH and C_INCLUDE_PATH environment
variables in llvm-lit. This should hopefully fix the build bot. The propagation of environmental variables was also slightly refactored.
Diffstat (limited to 'test/lit.cfg')
-rw-r--r-- | test/lit.cfg | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index 36a79b42..fcfbb7b0 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -36,9 +36,20 @@ if klee_obj_root is not None: path = os.path.pathsep.join((llvm_tools_dir, klee_tools_dir, config.environment['PATH'] )) config.environment['PATH'] = path -# Propogate 'HOME' through the environment. -config.environment['HOME'] = os.environ['HOME'] -config.environment['PWD'] = os.environ['PWD'] + +# Propogate some environment variable to test environment. +def addEnv(name): + if name in os.environ: + config.environment[name] = os.environ[name] + +addEnv('HOME') +addEnv('PWD') + +# llvm-gcc on Ubuntu needs to be told where to look +# for headers. If user has these in their environment +# we should propagate to test environment +addEnv('C_INCLUDE_PATH') +addEnv('CPLUS_INCLUDE_PATH') # Check that the object root is known. if config.test_exec_root is None: |