diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-06-06 13:28:37 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-06-06 13:28:37 +0000 |
commit | e3bf521b7c77fcc4e482b6a3ab1d049a283192d6 (patch) | |
tree | 940e53407cd6366e8ac8e938deef9f352c3d88d2 /compiler-rt/lib/tsan/lit_tests | |
parent | 5752dd46acc2189f3661229b53eb4df82875e3fa (diff) | |
download | bcm5719-llvm-e3bf521b7c77fcc4e482b6a3ab1d049a283192d6.tar.gz bcm5719-llvm-e3bf521b7c77fcc4e482b6a3ab1d049a283192d6.zip |
Remove a bunch of copy-paste: use common config for sanitizer lit/unit tests
llvm-svn: 183407
Diffstat (limited to 'compiler-rt/lib/tsan/lit_tests')
-rw-r--r-- | compiler-rt/lib/tsan/lit_tests/Unit/lit.cfg | 6 | ||||
-rw-r--r-- | compiler-rt/lib/tsan/lit_tests/Unit/lit.site.cfg.in | 18 | ||||
-rw-r--r-- | compiler-rt/lib/tsan/lit_tests/lit.cfg | 9 | ||||
-rw-r--r-- | compiler-rt/lib/tsan/lit_tests/lit.site.cfg.in | 18 |
4 files changed, 6 insertions, 45 deletions
diff --git a/compiler-rt/lib/tsan/lit_tests/Unit/lit.cfg b/compiler-rt/lib/tsan/lit_tests/Unit/lit.cfg index 0a0dbbfa549..1b8d17585e0 100644 --- a/compiler-rt/lib/tsan/lit_tests/Unit/lit.cfg +++ b/compiler-rt/lib/tsan/lit_tests/Unit/lit.cfg @@ -10,12 +10,6 @@ def get_required_attr(config, attr_name): "to lit.site.cfg " % attr_name) return attr_value -# Setup attributes common for all compiler-rt projects. -compiler_rt_src_root = get_required_attr(config, 'compiler_rt_src_root') -compiler_rt_lit_unit_cfg = os.path.join(compiler_rt_src_root, "lib", - "lit.common.unit.cfg") -lit.load_config(config, compiler_rt_lit_unit_cfg) - # Setup config name. config.name = 'ThreadSanitizer-Unit' diff --git a/compiler-rt/lib/tsan/lit_tests/Unit/lit.site.cfg.in b/compiler-rt/lib/tsan/lit_tests/Unit/lit.site.cfg.in index 6eedc218087..964da91ecee 100644 --- a/compiler-rt/lib/tsan/lit_tests/Unit/lit.site.cfg.in +++ b/compiler-rt/lib/tsan/lit_tests/Unit/lit.site.cfg.in @@ -1,20 +1,8 @@ ## Autogenerated by LLVM/Clang configuration. # Do not edit! -config.llvm_obj_root = "@LLVM_BINARY_DIR@" -config.llvm_src_root = "@LLVM_SOURCE_DIR@" -config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@" -config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" -config.llvm_build_mode = "@LLVM_BUILD_MODE@" +# Load common config for all compiler-rt unit tests. +lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured") -# LLVM tools dir can be passed in lit parameters, so try to -# apply substitution. -try: - config.llvm_tools_dir = config.llvm_tools_dir % lit.params - config.llvm_build_mode = config.llvm_build_mode % lit.params -except KeyError,e: - key, = e.args - lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key)) - -# Let the main config do the real work. +# Load tool-specific config that would do the real work. lit.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/Unit/lit.cfg") diff --git a/compiler-rt/lib/tsan/lit_tests/lit.cfg b/compiler-rt/lib/tsan/lit_tests/lit.cfg index d483d2fcbdc..6dc465437fd 100644 --- a/compiler-rt/lib/tsan/lit_tests/lit.cfg +++ b/compiler-rt/lib/tsan/lit_tests/lit.cfg @@ -48,15 +48,6 @@ if llvm_src_root is None: lit.load_config(config, tsan_site_cfg) raise SystemExit -# Setup attributes common for all compiler-rt projects. -compiler_rt_src_root = get_required_attr(config, 'compiler_rt_src_root') -compiler_rt_lit_cfg = os.path.join(compiler_rt_src_root, "lib", - "lit.common.cfg") -if (not compiler_rt_lit_cfg) or (not os.path.exists(compiler_rt_lit_cfg)): - lit.fatal("Can't find common compiler-rt lit config at: %r" - % compiler_rt_lit_cfg) -lit.load_config(config, compiler_rt_lit_cfg) - # Setup environment variables for running ThreadSanitizer. tsan_options = "atexit_sleep_ms=0" # Get path to external LLVM symbolizer to run ThreadSanitizer output tests. diff --git a/compiler-rt/lib/tsan/lit_tests/lit.site.cfg.in b/compiler-rt/lib/tsan/lit_tests/lit.site.cfg.in index 07b521af061..a212393a0e5 100644 --- a/compiler-rt/lib/tsan/lit_tests/lit.site.cfg.in +++ b/compiler-rt/lib/tsan/lit_tests/lit.site.cfg.in @@ -1,20 +1,8 @@ ## Autogenerated by LLVM/Clang configuration. # Do not edit! -config.clang = "@LLVM_BINARY_DIR@/bin/clang" -config.host_os = "@HOST_OS@" -config.llvm_src_root = "@LLVM_SOURCE_DIR@" -config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@" -config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" -config.target_triple = "@TARGET_TRIPLE@" +# Load common config for all compiler-rt lit tests. +lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured") -# LLVM tools dir can be passed in lit parameters, so try to -# apply substitution. -try: - config.llvm_tools_dir = config.llvm_tools_dir % lit.params -except KeyError,e: - key, = e.args - lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key)) - -# Let the main config do the real work. +# Load tool-specific config that would do the real work. lit.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg") |