[compiler-rt] r188116 - [tests] Update to use lit_config and lit package, as appropriate.

Daniel Dunbar daniel at zuster.org
Fri Aug 9 15:14:01 PDT 2013


Author: ddunbar
Date: Fri Aug  9 17:14:01 2013
New Revision: 188116

URL: http://llvm.org/viewvc/llvm-project?rev=188116&view=rev
Log:
[tests] Update to use lit_config and lit package, as appropriate.

Modified:
    compiler-rt/trunk/lib/asan/lit_tests/32bitConfig/lit.site.cfg.in
    compiler-rt/trunk/lib/asan/lit_tests/64bitConfig/lit.site.cfg.in
    compiler-rt/trunk/lib/asan/lit_tests/Unit/lit.site.cfg.in
    compiler-rt/trunk/lib/asan/lit_tests/lit.cfg
    compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg
    compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in
    compiler-rt/trunk/lib/lit.common.cfg
    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.cfg
    compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.site.cfg.in
    compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.cfg
    compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.site.cfg.in
    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.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/sanitizer_common/tests/lit.cfg
    compiler-rt/trunk/lib/sanitizer_common/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/asan/lit_tests/32bitConfig/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/32bitConfig/lit.site.cfg.in?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/32bitConfig/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/32bitConfig/lit.site.cfg.in Fri Aug  9 17:14:01 2013
@@ -2,12 +2,12 @@
 # Do not edit!
 
 # Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
 # Tool-specific config options.
 config.asan_source_dir = "@ASAN_SOURCE_DIR@"
 config.bits = "32"
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/lit.cfg")
+lit_config.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/lit.cfg")
 

Modified: compiler-rt/trunk/lib/asan/lit_tests/64bitConfig/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/64bitConfig/lit.site.cfg.in?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/64bitConfig/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/64bitConfig/lit.site.cfg.in Fri Aug  9 17:14:01 2013
@@ -2,11 +2,11 @@
 # Do not edit!
 
 # Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
 # Tool-specific config options.
 config.asan_source_dir = "@ASAN_SOURCE_DIR@"
 config.bits = "64"
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/lit.cfg")
+lit_config.load_config(config, "@ASAN_SOURCE_DIR@/lit_tests/lit.cfg")

Modified: compiler-rt/trunk/lib/asan/lit_tests/Unit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/Unit/lit.site.cfg.in?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/Unit/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/Unit/lit.site.cfg.in Fri Aug  9 17:14:01 2013
@@ -2,7 +2,7 @@
 # Do not edit!
 
 # Load common config for all compiler-rt unit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
 
 # Setup config name.
 config.name = 'AddressSanitizer-Unit'

Modified: compiler-rt/trunk/lib/asan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/lit.cfg?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/lit.cfg Fri Aug  9 17:14:01 2013
@@ -2,12 +2,15 @@
 
 import os
 
+import lit.util
+
 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)
+    lit_config.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.
@@ -17,9 +20,9 @@ config.name = 'AddressSanitizer' + confi
 config.test_source_root = os.path.dirname(__file__)
 
 def DisplayNoConfigMessage():
-  lit.fatal("No site specific configuration available! " +
-            "Try running your test from the build tree or running " +
-            "make check-asan")
+  lit_config.fatal("No site specific configuration available! " +
+                   "Try running your test from the build tree or running " +
+                   "make check-asan")
 
 # Figure out LLVM source root.
 llvm_src_root = getattr(config, 'llvm_src_root', None)
@@ -27,9 +30,9 @@ if llvm_src_root is None:
   # We probably haven't loaded the site-specific configuration: the user
   # is likely trying to run a test file directly, and the site configuration
   # wasn't created by the build system.
-  asan_site_cfg = lit.params.get('asan_site_config', None)
+  asan_site_cfg = lit_config.params.get('asan_site_config', None)
   if (asan_site_cfg) and (os.path.exists(asan_site_cfg)):
-    lit.load_config(config, asan_site_cfg)
+    lit_config.load_config(config, asan_site_cfg)
     raise SystemExit
 
   # Try to guess the location of site-specific configuration using llvm-config
@@ -45,7 +48,7 @@ if llvm_src_root is None:
   if (not asan_site_cfg) or (not os.path.exists(asan_site_cfg)):
     DisplayNoConfigMessage()
 
-  lit.load_config(config, asan_site_cfg)
+  lit_config.load_config(config, asan_site_cfg)
   raise SystemExit
 
 # Setup default compiler flags used with -fsanitize=address option.
@@ -74,7 +77,7 @@ config.environment['ASAN_SYMBOLIZER_PATH
 asan_source_dir = get_required_attr(config, "asan_source_dir")
 asan_symbolize = os.path.join(asan_source_dir, "scripts", "asan_symbolize.py")
 if not os.path.exists(asan_symbolize):
-  lit.fatal("Can't find script on path %r" % asan_symbolize)
+  lit_config.fatal("Can't find script on path %r" % asan_symbolize)
 config.substitutions.append( ("%asan_symbolize", " " + asan_symbolize + " ") )
 
 # Define CHECK-%os to check for OS-dependent output.

Modified: compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/dfsan/lit_tests/lit.cfg Fri Aug  9 17:14:01 2013
@@ -2,12 +2,15 @@
 
 import os
 
+import lit.util
+
 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)
+    lit_config.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.
@@ -17,9 +20,9 @@ config.name = 'DataFlowSanitizer'
 config.test_source_root = os.path.dirname(__file__)
 
 def DisplayNoConfigMessage():
-  lit.fatal("No site specific configuration available! " +
-            "Try running your test from the build tree or running " +
-            "make check-dfsan")
+  lit_config.fatal("No site specific configuration available! " +
+                   "Try running your test from the build tree or running " +
+                   "make check-dfsan")
 
 # Figure out LLVM source root.
 llvm_src_root = getattr(config, 'llvm_src_root', None)
@@ -27,9 +30,9 @@ if llvm_src_root is None:
   # We probably haven't loaded the site-specific configuration: the user
   # is likely trying to run a test file directly, and the site configuration
   # wasn't created by the build system.
-  dfsan_site_cfg = lit.params.get('dfsan_site_config', None)
+  dfsan_site_cfg = lit_config.params.get('dfsan_site_config', None)
   if (dfsan_site_cfg) and (os.path.exists(dfsan_site_cfg)):
-    lit.load_config(config, dfsan_site_cfg)
+    lit_config.load_config(config, dfsan_site_cfg)
     raise SystemExit
 
   # Try to guess the location of site-specific configuration using llvm-config
@@ -45,7 +48,7 @@ if llvm_src_root is None:
   if (not dfsan_site_cfg) or (not os.path.exists(dfsan_site_cfg)):
     DisplayNoConfigMessage()
 
-  lit.load_config(config, dfsan_site_cfg)
+  lit_config.load_config(config, dfsan_site_cfg)
   raise SystemExit
 
 # Setup default compiler flags used with -fsanitize=dataflow option.

Modified: compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/dfsan/lit_tests/lit.site.cfg.in Fri Aug  9 17:14:01 2013
@@ -1,5 +1,5 @@
 # Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@DFSAN_SOURCE_DIR@/lit_tests/lit.cfg")
+lit_config.load_config(config, "@DFSAN_SOURCE_DIR@/lit_tests/lit.cfg")

Modified: compiler-rt/trunk/lib/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lit.common.cfg?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lit.common.cfg (original)
+++ compiler-rt/trunk/lib/lit.common.cfg Fri Aug  9 17:14:01 2013
@@ -6,15 +6,17 @@
 import os
 import platform
 
+import lit.formats
+
 # Setup test format
 execute_external = (platform.system() != 'Windows'
-                    or lit.getBashPath() not in [None, ""])
+                    or lit_config.getBashPath() not in [None, ""])
 config.test_format = lit.formats.ShTest(execute_external)
 
 # Setup clang binary.
 clang_path = getattr(config, 'clang', None)
 if (not clang_path) or (not os.path.exists(clang_path)):
-  lit.fatal("Can't find Clang on path %r" % clang_path)
+  lit_config.fatal("Can't find Clang on path %r" % clang_path)
 
 # Clear some environment variables that might affect Clang.
 possibly_dangerous_env_vars = ['COMPILER_PATH', 'RC_DEBUG_OPTIONS',
@@ -36,7 +38,7 @@ for name in possibly_dangerous_env_vars:
 # 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.fatal("Invalid llvm_tools_dir config attribute: %r" % 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
 

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=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lit.common.configured.in (original)
+++ compiler-rt/trunk/lib/lit.common.configured.in Fri Aug  9 17:14:01 2013
@@ -16,10 +16,10 @@ config.compiler_rt_arch = "@COMPILER_RT_
 # 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_tools_dir = config.llvm_tools_dir % lit_config.params
 except KeyError,e:
   key, = e.args
-  lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
+  lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
 
 # Setup attributes common for all compiler-rt projects.
-lit.load_config(config, "@COMPILER_RT_SOURCE_DIR@/lib/lit.common.cfg")
+lit_config.load_config(config, "@COMPILER_RT_SOURCE_DIR@/lib/lit.common.cfg")

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=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lit.common.unit.configured.in (original)
+++ compiler-rt/trunk/lib/lit.common.unit.configured.in Fri Aug  9 17:14:01 2013
@@ -12,11 +12,11 @@ config.llvm_build_mode = "@LLVM_BUILD_MO
 # 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
+  config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+  config.llvm_build_mode = config.llvm_build_mode % lit_config.params
 except KeyError,e:
   key, = e.args
-  lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
+  lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
 
 # Setup attributes common for all compiler-rt unit tests.
-lit.load_config(config, "@COMPILER_RT_SOURCE_DIR@/lib/lit.common.unit.cfg")
+lit_config.load_config(config, "@COMPILER_RT_SOURCE_DIR@/lib/lit.common.unit.cfg")

Modified: compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.cfg?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.cfg (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/AsanConfig/lit.cfg Fri Aug  9 17:14:01 2013
@@ -5,16 +5,17 @@ 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)
+    lit_config.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
 
 lsan_lit_src_root = get_required_attr(config, "lsan_lit_src_root")
 lsan_lit_cfg = os.path.join(lsan_lit_src_root, "lit.common.cfg")
 if not os.path.exists(lsan_lit_cfg):
-  lit.fatal("Can't find common LSan lit config at: %r" % lsan_lit_cfg)
-lit.load_config(config, lsan_lit_cfg)
+  lit_config.fatal("Can't find common LSan lit config at: %r" % lsan_lit_cfg)
+lit_config.load_config(config, lsan_lit_cfg)
 
 config.name = 'LeakSanitizer-AddressSanitizer'
 

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=188116&r1=188115&r2=188116&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 Fri Aug  9 17:14:01 2013
@@ -1,8 +1,8 @@
 # Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
 # Tool-specific config options.
 config.lsan_lit_src_root = "@LSAN_LIT_SOURCE_DIR@"
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@LSAN_LIT_SOURCE_DIR@/AsanConfig/lit.cfg")
+lit_config.load_config(config, "@LSAN_LIT_SOURCE_DIR@/AsanConfig/lit.cfg")

Modified: compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.cfg?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.cfg (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/LsanConfig/lit.cfg Fri Aug  9 17:14:01 2013
@@ -5,16 +5,17 @@ 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)
+    lit_config.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
 
 lsan_lit_src_root = get_required_attr(config, "lsan_lit_src_root")
 lsan_lit_cfg = os.path.join(lsan_lit_src_root, "lit.common.cfg")
 if not os.path.exists(lsan_lit_cfg):
-  lit.fatal("Can't find common LSan lit config at: %r" % lsan_lit_cfg)
-lit.load_config(config, lsan_lit_cfg)
+  lit_config.fatal("Can't find common LSan lit config at: %r" % lsan_lit_cfg)
+lit_config.load_config(config, lsan_lit_cfg)
 
 config.name = 'LeakSanitizer-Standalone'
 

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=188116&r1=188115&r2=188116&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 Fri Aug  9 17:14:01 2013
@@ -1,8 +1,8 @@
 # Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
 # Tool-specific config options.
 config.lsan_lit_src_root = "@LSAN_LIT_SOURCE_DIR@"
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@LSAN_LIT_SOURCE_DIR@/LsanConfig/lit.cfg")
+lit_config.load_config(config, "@LSAN_LIT_SOURCE_DIR@/LsanConfig/lit.cfg")

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=188116&r1=188115&r2=188116&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 Fri Aug  9 17:14:01 2013
@@ -2,7 +2,7 @@
 # Do not edit!
 
 # Load common config for all compiler-rt unit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
 
 # Setup config name.
 config.name = 'LeakSanitizer-Unit'

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=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/lit.common.cfg Fri Aug  9 17:14:01 2013
@@ -7,9 +7,10 @@ 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)
+    lit_config.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 source root.

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=188116&r1=188115&r2=188116&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 Fri Aug  9 17:14:01 2013
@@ -2,7 +2,7 @@
 # Do not edit!
 
 # Load common config for all compiler-rt unit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
 
 # Setup config name.
 config.name = 'MemorySanitizer-Unit'

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=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/msan/lit_tests/lit.cfg Fri Aug  9 17:14:01 2013
@@ -2,12 +2,15 @@
 
 import os
 
+import lit.util
+
 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)
+    lit_config.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.
@@ -17,9 +20,9 @@ config.name = 'MemorySanitizer'
 config.test_source_root = os.path.dirname(__file__)
 
 def DisplayNoConfigMessage():
-  lit.fatal("No site specific configuration available! " +
-            "Try running your test from the build tree or running " +
-            "make check-msan")
+  lit_config.fatal("No site specific configuration available! " +
+                   "Try running your test from the build tree or running " +
+                   "make check-msan")
 
 # Figure out LLVM source root.
 llvm_src_root = getattr(config, 'llvm_src_root', None)
@@ -27,9 +30,9 @@ if llvm_src_root is None:
   # We probably haven't loaded the site-specific configuration: the user
   # is likely trying to run a test file directly, and the site configuration
   # wasn't created by the build system.
-  msan_site_cfg = lit.params.get('msan_site_config', None)
+  msan_site_cfg = lit_config.params.get('msan_site_config', None)
   if (msan_site_cfg) and (os.path.exists(msan_site_cfg)):
-    lit.load_config(config, msan_site_cfg)
+    lit_config.load_config(config, msan_site_cfg)
     raise SystemExit
 
   # Try to guess the location of site-specific configuration using llvm-config
@@ -45,7 +48,7 @@ if llvm_src_root is None:
   if (not msan_site_cfg) or (not os.path.exists(msan_site_cfg)):
     DisplayNoConfigMessage()
 
-  lit.load_config(config, msan_site_cfg)
+  lit_config.load_config(config, msan_site_cfg)
   raise SystemExit
 
 # Setup default compiler flags used with -fsanitize=memory option.

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=188116&r1=188115&r2=188116&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 Fri Aug  9 17:14:01 2013
@@ -1,5 +1,5 @@
 # Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@MSAN_SOURCE_DIR@/lit_tests/lit.cfg")
+lit_config.load_config(config, "@MSAN_SOURCE_DIR@/lit_tests/lit.cfg")

Modified: compiler-rt/trunk/lib/sanitizer_common/tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/lit.cfg?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/lit.cfg Fri Aug  9 17:14:01 2013
@@ -5,16 +5,17 @@ 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)
+    lit_config.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 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)
+lit_config.load_config(config, compiler_rt_lit_unit_cfg)
 
 # Setup config name.
 config.name = 'SanitizerCommon-Unit'

Modified: compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in?rev=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in Fri Aug  9 17:14:01 2013
@@ -7,10 +7,10 @@ config.compiler_rt_src_root = "@COMPILER
 config.llvm_build_mode = "@LLVM_BUILD_MODE@"
 
 try:
-  config.llvm_build_mode = config.llvm_build_mode % lit.params
+  config.llvm_build_mode = config.llvm_build_mode % lit_config.params
 except KeyError,e:
   key, = e.args
-  lit.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
+  lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key, key))
 
 # Let the main config do the real work.
-lit.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
+lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/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=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.cfg (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/Unit/lit.cfg Fri Aug  9 17:14:01 2013
@@ -5,9 +5,10 @@ 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)
+    lit_config.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.

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=188116&r1=188115&r2=188116&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 Fri Aug  9 17:14:01 2013
@@ -2,7 +2,7 @@
 # Do not edit!
 
 # Load common config for all compiler-rt unit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.unit.configured")
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/Unit/lit.cfg")
+lit_config.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=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/lit.cfg Fri Aug  9 17:14:01 2013
@@ -2,12 +2,15 @@
 
 import os
 
+import lit.util
+
 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)
+    lit_config.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.
@@ -17,9 +20,9 @@ config.name = 'ThreadSanitizer'
 config.test_source_root = os.path.dirname(__file__)
 
 def DisplayNoConfigMessage():
-  lit.fatal("No site specific configuration available! " +
-            "Try running your test from the build tree or running " +
-            "make check-tsan")
+  lit_config.fatal("No site specific configuration available! " +
+                   "Try running your test from the build tree or running " +
+                   "make check-tsan")
 
 # Figure out LLVM source root.
 llvm_src_root = getattr(config, 'llvm_src_root', None)
@@ -27,9 +30,9 @@ if llvm_src_root is None:
   # We probably haven't loaded the site-specific configuration: the user
   # is likely trying to run a test file directly, and the site configuration
   # wasn't created by the build system.
-  tsan_site_cfg = lit.params.get('tsan_site_config', None)
+  tsan_site_cfg = lit_config.params.get('tsan_site_config', None)
   if (tsan_site_cfg) and (os.path.exists(tsan_site_cfg)):
-    lit.load_config(config, tsan_site_cfg)
+    lit_config.load_config(config, tsan_site_cfg)
     raise SystemExit
 
   # Try to guess the location of site-specific configuration using llvm-config
@@ -45,7 +48,7 @@ if llvm_src_root is None:
   if (not tsan_site_cfg) or (not os.path.exists(tsan_site_cfg)):
     DisplayNoConfigMessage()
 
-  lit.load_config(config, tsan_site_cfg)
+  lit_config.load_config(config, tsan_site_cfg)
   raise SystemExit
 
 # Setup environment variables for running ThreadSanitizer.

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=188116&r1=188115&r2=188116&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 Fri Aug  9 17:14:01 2013
@@ -2,7 +2,7 @@
 # Do not edit!
 
 # Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
+lit_config.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=188116&r1=188115&r2=188116&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/lit_tests/lit.cfg (original)
+++ compiler-rt/trunk/lib/ubsan/lit_tests/lit.cfg Fri Aug  9 17:14:01 2013
@@ -5,9 +5,10 @@ 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)
+    lit_config.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.
@@ -17,9 +18,9 @@ config.name = 'UndefinedBehaviorSanitize
 config.test_source_root = os.path.dirname(__file__)
 
 def DisplayNoConfigMessage():
-  lit.fatal("No site specific configuration available! " +
-            "Try running your test from the build tree or running " +
-            "make check-ubsan")
+  lit_config.fatal("No site specific configuration available! " +
+                   "Try running your test from the build tree or running " +
+                   "make check-ubsan")
 
 # Figure out LLVM source root.
 llvm_src_root = getattr(config, 'llvm_src_root', None)
@@ -27,9 +28,9 @@ if llvm_src_root is None:
   # We probably haven't loaded the site-specific configuration: the user
   # is likely trying to run a test file directly, and the site configuration
   # wasn't created by the build system or we're performing an out-of-tree build.
-  ubsan_site_cfg = lit.params.get('ubsan_site_config', None)
+  ubsan_site_cfg = lit_config.params.get('ubsan_site_config', None)
   if ubsan_site_cfg and os.path.exists(ubsan_site_cfg):
-    lit.load_config(config, ubsan_site_cfg)
+    lit_config.load_config(config, ubsan_site_cfg)
     raise SystemExit
 
   # Try to guess the location of site-specific configuration using llvm-config
@@ -45,7 +46,7 @@ if llvm_src_root is None:
   if not ubsan_site_cfg or not os.path.exists(ubsan_site_cfg):
     DisplayNoConfigMessage()
 
-  lit.load_config(config, ubsan_site_cfg)
+  lit_config.load_config(config, ubsan_site_cfg)
   raise SystemExit
 
 # Define %clang substitution to use in test RUN lines.

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=188116&r1=188115&r2=188116&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 Fri Aug  9 17:14:01 2013
@@ -2,7 +2,7 @@
 # Do not edit!
 
 # Load common config for all compiler-rt lit tests.
-lit.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
+lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/lib/lit.common.configured")
 
 # Load tool-specific config that would do the real work.
-lit.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")
+lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")





More information about the llvm-commits mailing list