From ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 7 Jan 2015 19:55:37 +0000 Subject: Import compiler-rt trunk r224034. https://llvm.org/svn/llvm-project/compiler-rt/trunk@224034 --- unittests/lit.common.unit.cfg | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 unittests/lit.common.unit.cfg (limited to 'unittests/lit.common.unit.cfg') diff --git a/unittests/lit.common.unit.cfg b/unittests/lit.common.unit.cfg new file mode 100644 index 000000000000..2bd8f376f00e --- /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'] -- cgit v1.2.3