[polly] r188114 - [tests] Update to use lit_config and lit package, as appropriate.

Daniel Dunbar daniel at zuster.org
Fri Aug 9 14:54:36 PDT 2013


Author: ddunbar
Date: Fri Aug  9 16:54:36 2013
New Revision: 188114

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

Modified:
    polly/trunk/test/lit.cfg
    polly/trunk/test/lit.site.cfg.in

Modified: polly/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/lit.cfg?rev=188114&r1=188113&r2=188114&view=diff
==============================================================================
--- polly/trunk/test/lit.cfg (original)
+++ polly/trunk/test/lit.cfg Fri Aug  9 16:54:36 2013
@@ -4,6 +4,9 @@ import os
 import platform
 import re
 
+import lit.formats
+import lit.util
+
 # Configuration file for the 'lit' test runner.
 
 # name: The name of this test suite.
@@ -35,13 +38,13 @@ config.llvm_obj_root = getattr(config, '
 if polly_obj_root is not None:
     llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
     if not llvm_tools_dir:
-        lit.fatal('No LLVM tools dir set!')
+        lit_config.fatal('No LLVM tools dir set!')
     path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
     config.environment['PATH'] = path
 
     llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
     if not llvm_libs_dir:
-        lit.fatal('No LLVM libs dir set!')
+        lit_config.fatal('No LLVM libs dir set!')
     path = os.path.pathsep.join((llvm_libs_dir,
                                  config.environment.get('LD_LIBRARY_PATH','')))
     config.environment['LD_LIBRARY_PATH'] = path
@@ -56,9 +59,9 @@ if config.test_exec_root is None:
     # out-of-tree build situation).
 
     # Check for 'polly_site_config' user parameter, and use that if available.
-    site_cfg = lit.params.get('polly_site_config', None)
+    site_cfg = lit_config.params.get('polly_site_config', None)
     if site_cfg and os.path.exists(site_cfg):
-        lit.load_config(config, site_cfg)
+        lit_config.load_config(config, site_cfg)
         raise SystemExit
 
     # Try to detect the situation where we are using an out-of-tree build by
@@ -72,7 +75,7 @@ if config.test_exec_root is None:
 
     llvm_config = lit.util.which('llvm-config', config.environment['PATH'])
     if not llvm_config:
-        lit.fatal('No site specific configuration available!')
+        lit_config.fatal('No site specific configuration available!')
 
     # Get the source and object roots.
     llvm_src_root = lit.util.capture(['llvm-config', '--src-root']).strip()
@@ -84,16 +87,16 @@ if config.test_exec_root is None:
     # tools/polly layout.
     this_src_root = os.path.dirname(config.test_source_root)
     if os.path.realpath(polly_src_root) != os.path.realpath(this_src_root):
-        lit.fatal('No site specific configuration available!')
+        lit_config.fatal('No site specific configuration available!')
 
     # Check that the site specific configuration exists.
     site_cfg = os.path.join(polly_obj_root, 'test', 'lit.site.cfg')
     if not os.path.exists(site_cfg):
-        lit.fatal('No site specific configuration available!')
+        lit_config.fatal('No site specific configuration available!')
 
     # Okay, that worked. Notify the user of the automagic, and reconfigure.
-    lit.note('using out-of-tree build at %r' % polly_obj_root)
-    lit.load_config(config, site_cfg)
+    lit_config.note('using out-of-tree build at %r' % polly_obj_root)
+    lit_config.load_config(config, site_cfg)
     raise SystemExit
 
 # llc knows whether he is compiled with -DNDEBUG.

Modified: polly/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/lit.site.cfg.in?rev=188114&r1=188113&r2=188114&view=diff
==============================================================================
--- polly/trunk/test/lit.site.cfg.in (original)
+++ polly/trunk/test/lit.site.cfg.in Fri Aug  9 16:54:36 2013
@@ -19,11 +19,11 @@ if (re.match(r'^x86_64*', '@TARGET_TRIPL
 # Support substitution of the tools and libs dirs with user parameters. This is
 # used when we can't determine the tool dir at configuration time.
 try:
-    config.llvm_tools_dir = config.llvm_tools_dir % lit.params
-    config.llvm_libs_dir = config.llvm_libs_dir % lit.params
+    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+    config.llvm_libs_dir = config.llvm_libs_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))
 
 config.substitutions.append(('%loadPolly', '-load '
                              + config.polly_lib_dir + '/LLVMPolly at LLVM_SHLIBEXT@'))
@@ -32,4 +32,4 @@ config.substitutions.append(('%polybench
 config.substitutions.append(('%vector-opt', '-polly-vectorizer=polly'))
 
 # Let the main config do the real work.
-lit.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")
+lit_config.load_config(config, "@POLLY_SOURCE_DIR@/test/lit.cfg")





More information about the llvm-commits mailing list