[compiler-rt] r183407 - Remove a bunch of copy-paste: use common config for sanitizer lit/unit tests

Alexey Samsonov samsonov at google.com
Thu Jun 6 06:28:37 PDT 2013


Author: samsonov
Date: Thu Jun  6 08:28:37 2013
New Revision: 183407

URL: http://llvm.org/viewvc/llvm-project?rev=183407&view=rev
Log:
Remove a bunch of copy-paste: use common config for sanitizer lit/unit tests

Modified:
    compiler-rt/trunk/lib/lit.common.configured.in
    compiler-rt/trunk/lib/lit.common.unit.configured.in
    compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.site.cfg.in
    compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.site.cfg.in
    compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.cfg
    compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.site.cfg.in
    compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg
    compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.cfg
    compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.site.cfg.in
    compiler-rt/trunk/lib/msan/lit_tests/lit.cfg
    compiler-rt/trunk/lib/msan/lit_tests/lit.site.cfg.in
    compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.cfg
    compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.site.cfg.in
    compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg
    compiler-rt/trunk/lib/tsan/lit_tests/lit.site.cfg.in
    compiler-rt/trunk/lib/ubsan/lit_tests/lit.cfg
    compiler-rt/trunk/lib/ubsan/lit_tests/lit.site.cfg.in

Modified: compiler-rt/trunk/lib/lit.common.configured.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lit.common.configured.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lit.common.configured.in (original)
+++ compiler-rt/trunk/lib/lit.common.configured.in Thu Jun  6 08:28:37 2013
@@ -3,7 +3,9 @@
 
 # Generic config options for all compiler-rt lit tests.
 config.target_triple = "@TARGET_TRIPLE@"
+config.host_arch = "@HOST_ARCH@"
 config.host_os = "@HOST_OS@"
+config.llvm_build_mode = "@LLVM_BUILD_MODE@"
 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
 config.llvm_obj_root = "@LLVM_BINARY_DIR@"
 config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"

Modified: compiler-rt/trunk/lib/lit.common.unit.configured.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lit.common.unit.configured.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lit.common.unit.configured.in (original)
+++ compiler-rt/trunk/lib/lit.common.unit.configured.in Thu Jun  6 08:28:37 2013
@@ -4,10 +4,15 @@
 # Generic config options for all compiler-rt unit tests.
 config.target_triple = "@TARGET_TRIPLE@"
 config.llvm_src_root = "@LLVM_SOURCE_DIR@"
+config.llvm_obj_root = "@LLVM_BINARY_DIR@"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
 config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
 config.llvm_build_mode = "@LLVM_BUILD_MODE@"
 
+# LLVM tools dir and build mode 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

Modified: compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.site.cfg.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.site.cfg.in Thu Jun  6 08:28:37 2013
@@ -1,21 +1,8 @@
-config.host_os = "@HOST_OS@"
-config.host_arch = "@HOST_ARCH@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
-config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.clang = "@LLVM_BINARY_DIR@/bin/clang"
-config.compiler_rt_arch = "@COMPILER_RT_SUPPORTED_ARCH@"
-config.lsan_lit_src_root = "@LSAN_LIT_SOURCE_DIR@"
+# 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))
+# Tool-specific config options.
+config.lsan_lit_src_root = "@LSAN_LIT_SOURCE_DIR@"
 
-# Let the main config do the real work.
+# Load tool-specific config that would do the real work.
 lit.load_config(config, "@LSAN_LIT_SOURCE_DIR@/AsanConfig/lit.cfg")

Modified: compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.site.cfg.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.site.cfg.in Thu Jun  6 08:28:37 2013
@@ -1,21 +1,8 @@
-config.host_os = "@HOST_OS@"
-config.host_arch = "@HOST_ARCH@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
-config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.clang = "@LLVM_BINARY_DIR@/bin/clang"
-config.compiler_rt_arch = "@COMPILER_RT_SUPPORTED_ARCH@"
-config.lsan_lit_src_root = "@LSAN_LIT_SOURCE_DIR@"
+# 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))
+# Tool-specific config options.
+config.lsan_lit_src_root = "@LSAN_LIT_SOURCE_DIR@"
 
-# Let the main config do the real work.
+# Load tool-specific config that would do the real work.
 lit.load_config(config, "@LSAN_LIT_SOURCE_DIR@/LsanConfig/lit.cfg")

Modified: compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.cfg?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.cfg (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.cfg Thu Jun  6 08:28:37 2013
@@ -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 = 'LeakSanitizer-Unit'
 

Modified: compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.site.cfg.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/Unit/lit.site.cfg.in Thu Jun  6 08:28:37 2013
@@ -1,17 +1,11 @@
 ## Autogenerated by LLVM/Clang configuration.
 # Do not edit!
 
-config.target_triple = "@TARGET_TRIPLE@"
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
-config.lsan_binary_dir = "@LSAN_BINARY_DIR@"
+# Load common config for all compiler-rt unit tests.
+lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
 
-try:
-  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))
+# Tool-specific config options.
+config.lsan_binary_dir = "@LSAN_BINARY_DIR@"
 
-# Let the main config do the real work.
+# Load tool-specific config that would do the real work.
 lit.load_config(config, "@LSAN_SOURCE_DIR@/lit_tests/Unit/lit.cfg")

Modified: compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg Thu Jun  6 08:28:37 2013
@@ -16,14 +16,6 @@ def get_required_attr(config, attr_name)
 lsan_lit_src_root = get_required_attr(config, 'lsan_lit_src_root')
 config.test_source_root = os.path.join(lsan_lit_src_root, 'TestCases')
 
-# 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)
-
 clang_cxxflags = ("-ccc-cxx "
                       + "-g "
                       + "-O0 "

Modified: compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.cfg?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.cfg (original)
+++ compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.cfg Thu Jun  6 08:28:37 2013
@@ -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 = 'MemorySanitizer-Unit'
 

Modified: compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.site.cfg.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/msan/lit_tests/Unit/lit.site.cfg.in Thu Jun  6 08:28:37 2013
@@ -1,17 +1,11 @@
 ## Autogenerated by LLVM/Clang configuration.
 # Do not edit!
 
-config.target_triple = "@TARGET_TRIPLE@"
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
-config.msan_binary_dir = "@MSAN_BINARY_DIR@"
+# Load common config for all compiler-rt unit tests.
+lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
 
-try:
-  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))
+# Tool-specific config options.
+config.msan_binary_dir = "@MSAN_BINARY_DIR@"
 
-# Let the main config do the real work.
+# Load tool-specific config that would do the real work.
 lit.load_config(config, "@MSAN_SOURCE_DIR@/lit_tests/Unit/lit.cfg")

Modified: compiler-rt/trunk/lib/msan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/lit_tests/lit.cfg?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/msan/lit_tests/lit.cfg Thu Jun  6 08:28:37 2013
@@ -48,15 +48,6 @@ if llvm_src_root is None:
   lit.load_config(config, msan_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 default compiler flags used with -fsanitize=memory option.
 clang_msan_cflags = ["-fsanitize=memory",
                      "-mno-omit-leaf-frame-pointer",

Modified: compiler-rt/trunk/lib/msan/lit_tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/lit_tests/lit.site.cfg.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/lit_tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/msan/lit_tests/lit.site.cfg.in Thu Jun  6 08:28:37 2013
@@ -1,18 +1,5 @@
-config.target_triple = "@TARGET_TRIPLE@"
-config.host_os = "@HOST_OS@"
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
-config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.clang = "@LLVM_BINARY_DIR@/bin/clang"
+# 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, "@MSAN_SOURCE_DIR@/lit_tests/lit.cfg")

Modified: compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.cfg?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.cfg (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.cfg Thu Jun  6 08:28:37 2013
@@ -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'
 

Modified: compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.site.cfg.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.site.cfg.in Thu Jun  6 08:28:37 2013
@@ -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")

Modified: compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg Thu Jun  6 08:28:37 2013
@@ -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.

Modified: compiler-rt/trunk/lib/tsan/lit_tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/lit.site.cfg.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/lit.site.cfg.in Thu Jun  6 08:28:37 2013
@@ -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")

Modified: compiler-rt/trunk/lib/ubsan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/lit.cfg?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/lit.cfg Thu Jun  6 08:28:37 2013
@@ -48,15 +48,6 @@ if llvm_src_root is None:
   lit.load_config(config, ubsan_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)
-
 # Default test suffixes.
 config.suffixes = ['.c', '.cc', '.cpp']
 

Modified: compiler-rt/trunk/lib/ubsan/lit_tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/lit.site.cfg.in?rev=183407&r1=183406&r2=183407&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/lit.site.cfg.in Thu Jun  6 08:28:37 2013
@@ -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")





More information about the llvm-commits mailing list