diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-02-14 11:00:07 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-02-14 11:00:07 +0000 |
commit | e1c4400a92b57ecf62abb892da2a8a0a3be43600 (patch) | |
tree | b454fe437d46bd919e9eb7bce2bc32ea957015ae /unittests/lit.common.unit.cfg | |
parent | ea9eb19ec0fea9d387bfe41bb187efd4a1a52fd5 (diff) |
Move shared configs for lit test suites to test/ and unittests/ directories
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/lit.common.unit.cfg')
-rw-r--r-- | unittests/lit.common.unit.cfg | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/unittests/lit.common.unit.cfg b/unittests/lit.common.unit.cfg new file mode 100644 index 000000000..2bd8f376f --- /dev/null +++ b/unittests/lit.common.unit.cfg @@ -0,0 +1,30 @@ +# -*- Python -*- + +# Configuration file for 'lit' test runner. +# This file contains common config setup rules for unit tests in various +# compiler-rt testsuites. + +import os + +import lit.formats + +# Setup test format +llvm_build_mode = getattr(config, "llvm_build_mode", "Debug") +config.test_format = lit.formats.GoogleTest(llvm_build_mode, "Test") + +# Setup test suffixes. +config.suffixes = [] + +# Tweak PATH to include llvm tools dir. +llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) +if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)): + lit_config.fatal("Invalid llvm_tools_dir config attribute: %r" % llvm_tools_dir) +path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) +config.environment['PATH'] = path + +# Propagate the temp directory. Windows requires this because it uses \Windows\ +# if none of these are present. +if 'TMP' in os.environ: + config.environment['TMP'] = os.environ['TMP'] +if 'TEMP' in os.environ: + config.environment['TEMP'] = os.environ['TEMP'] |