about summary refs log tree commit diff homepage
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg17
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: