diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Runtime/POSIX/Isatty.c | 4 | ||||
-rw-r--r-- | test/lit.cfg | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/test/Runtime/POSIX/Isatty.c b/test/Runtime/POSIX/Isatty.c index bd514d48..3054aadb 100644 --- a/test/Runtime/POSIX/Isatty.c +++ b/test/Runtime/POSIX/Isatty.c @@ -1,5 +1,5 @@ // RUN: %llvmgcc %s -emit-llvm -O0 -c -o %t.bc -// RUN: %klee --libc=uclibc --posix-runtime %t.bc --sym-files 0 10 --sym-stdout 2>%t.log +// RUN: %klee --libc=uclibc --posix-runtime %t.bc --sym-files 0 10 --sym-stdout > %t.log 2>&1 // RUN: test -f %T/klee-last/test000001.ktest // RUN: test -f %T/klee-last/test000002.ktest // RUN: test -f %T/klee-last/test000003.ktest @@ -10,7 +10,7 @@ // RUN: grep -q "stdout is NOT a tty" %t.log // Depending on how uClibc is compiled (i.e. without -DKLEE_SYM_PRINTF) -// fprintf prints out on stdout even stderr is provided. +// fprintf prints out on stdout even if stderr is provided. #include <unistd.h> #include <stdio.h> #include <assert.h> diff --git a/test/lit.cfg b/test/lit.cfg index ab1b7678..23696138 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: |