Simplify lit configs for asan/lsan/msan unit tests
llvm-svn: 183410
This commit is contained in:
parent
1ba2733e2c
commit
f6630ecee9
|
|
@ -1,20 +0,0 @@
|
|||
# -*- Python -*-
|
||||
|
||||
import os
|
||||
|
||||
def get_required_attr(config, attr_name):
|
||||
attr_value = getattr(config, attr_name, None)
|
||||
if not attr_value:
|
||||
lit.fatal("No attribute %r in test configuration! You may need to run "
|
||||
"tests from your build directory or add this attribute "
|
||||
"to lit.site.cfg " % attr_name)
|
||||
return attr_value
|
||||
|
||||
# Setup config name.
|
||||
config.name = 'AddressSanitizer-Unit'
|
||||
|
||||
# Setup test source and exec root. For unit tests, we define
|
||||
# it as build directory with ASan unit tests.
|
||||
asan_binary_dir = get_required_attr(config, "asan_binary_dir")
|
||||
config.test_exec_root = os.path.join(asan_binary_dir, "tests")
|
||||
config.test_source_root = config.test_exec_root
|
||||
|
|
@ -4,8 +4,10 @@
|
|||
# Load common config for all compiler-rt unit tests.
|
||||
lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
|
||||
|
||||
# Tool-specific config options.
|
||||
config.asan_binary_dir = "@ASAN_BINARY_DIR@"
|
||||
# Setup config name.
|
||||
config.name = 'AddressSanitizer-Unit'
|
||||
|
||||
# Load tool-specific config that would do the real work.
|
||||
lit.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/Unit/lit.cfg")
|
||||
# Setup test source and exec root. For unit tests, we define
|
||||
# it as build directory with ASan unit tests.
|
||||
config.test_exec_root = "@ASAN_BINARY_DIR@/tests"
|
||||
config.test_source_root = config.test_exec_root
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
# -*- Python -*-
|
||||
|
||||
import os
|
||||
|
||||
def get_required_attr(config, attr_name):
|
||||
attr_value = getattr(config, attr_name, None)
|
||||
if not attr_value:
|
||||
lit.fatal("No attribute %r in test configuration! You may need to run "
|
||||
"tests from your build directory or add this attribute "
|
||||
"to lit.site.cfg " % attr_name)
|
||||
return attr_value
|
||||
|
||||
# Setup config name.
|
||||
config.name = 'LeakSanitizer-Unit'
|
||||
|
||||
# Setup test source and exec root. For unit tests, we define
|
||||
# it as build directory with LSan unit tests.
|
||||
lsan_binary_dir = get_required_attr(config, "lsan_binary_dir")
|
||||
config.test_exec_root = os.path.join(lsan_binary_dir, "tests")
|
||||
config.test_source_root = config.test_exec_root
|
||||
|
|
@ -4,8 +4,9 @@
|
|||
# Load common config for all compiler-rt unit tests.
|
||||
lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
|
||||
|
||||
# Tool-specific config options.
|
||||
config.lsan_binary_dir = "@LSAN_BINARY_DIR@"
|
||||
|
||||
# Load tool-specific config that would do the real work.
|
||||
lit.load_config(config, "@LSAN_SOURCE_DIR@/lit_tests/Unit/lit.cfg")
|
||||
# Setup config name.
|
||||
config.name = 'LeakSanitizer-Unit'
|
||||
# Setup test source and exec root. For unit tests, we define
|
||||
# it as build directory with LSan unit tests.
|
||||
config.test_exec_root = "@LSAN_BINARY_DIR@/tests"
|
||||
config.test_source_root = config.test_exec_root
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
# -*- Python -*-
|
||||
|
||||
import os
|
||||
|
||||
def get_required_attr(config, attr_name):
|
||||
attr_value = getattr(config, attr_name, None)
|
||||
if not attr_value:
|
||||
lit.fatal("No attribute %r in test configuration! You may need to run "
|
||||
"tests from your build directory or add this attribute "
|
||||
"to lit.site.cfg " % attr_name)
|
||||
return attr_value
|
||||
|
||||
# Setup config name.
|
||||
config.name = 'MemorySanitizer-Unit'
|
||||
|
||||
# Setup test source and exec root. For unit tests, we define
|
||||
# it as build directory with MSan unit tests.
|
||||
msan_binary_dir = get_required_attr(config, "msan_binary_dir")
|
||||
config.test_exec_root = os.path.join(msan_binary_dir, "tests")
|
||||
config.test_source_root = config.test_exec_root
|
||||
|
|
@ -4,8 +4,10 @@
|
|||
# Load common config for all compiler-rt unit tests.
|
||||
lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
|
||||
|
||||
# Tool-specific config options.
|
||||
config.msan_binary_dir = "@MSAN_BINARY_DIR@"
|
||||
# Setup config name.
|
||||
config.name = 'MemorySanitizer-Unit'
|
||||
|
||||
# Load tool-specific config that would do the real work.
|
||||
lit.load_config(config, "@MSAN_SOURCE_DIR@/lit_tests/Unit/lit.cfg")
|
||||
# Setup test source and exec root. For unit tests, we define
|
||||
# it as build directory with MSan unit tests.
|
||||
config.test_exec_root = "@MSAN_BINARY_DIR@/tests"
|
||||
config.test_source_root = config.test_exec_root
|
||||
|
|
|
|||
Loading…
Reference in New Issue