From f629a6d1ec51b39334c78bce354b3efb245c35b3 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Tue, 4 Feb 2014 19:56:57 +0000 Subject: 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. --- test/lit.cfg | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'test/lit.cfg') 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: -- cgit 1.4.1