[lld] r204773 - [lit] Python 3.

Michael J. Spencer bigcheesegs at gmail.com
Tue Mar 25 17:53:48 PDT 2014


Author: mspencer
Date: Tue Mar 25 19:53:48 2014
New Revision: 204773

URL: http://llvm.org/viewvc/llvm-project?rev=204773&view=rev
Log:
[lit] Python 3.

Modified:
    lld/trunk/test/Unit/lit.site.cfg.in
    lld/trunk/test/lit.cfg
    lld/trunk/test/lit.site.cfg.in

Modified: lld/trunk/test/Unit/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/Unit/lit.site.cfg.in?rev=204773&r1=204772&r2=204773&view=diff
==============================================================================
--- lld/trunk/test/Unit/lit.site.cfg.in (original)
+++ lld/trunk/test/Unit/lit.site.cfg.in Tue Mar 25 19:53:48 2014
@@ -17,7 +17,7 @@ try:
     config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
     config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
     config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError,e:
+except KeyError as e:
     key, = e.args
     lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
 

Modified: lld/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg?rev=204773&r1=204772&r2=204773&view=diff
==============================================================================
--- lld/trunk/test/lit.cfg (original)
+++ lld/trunk/test/lit.cfg Tue Mar 25 19:53:48 2014
@@ -4,6 +4,7 @@ import os
 import platform
 import re
 import subprocess
+import locale
 
 import lit.formats
 import lit.util
@@ -131,11 +132,11 @@ try:
      subprocess.Popen([os.path.join(llvm_tools_dir, 'llvm-config'),
                      '--build-mode', '--assertion-mode'],
                       stdout = subprocess.PIPE)
-except OSError, why:
-    print "Could not find llvm-config in " + llvm_tools_dir
+except OSError as why:
+    print("Could not find llvm-config in " + llvm_tools_dir)
     exit(42)
 
-llvm_config_output = llvm_config_cmd.stdout.read()
+llvm_config_output = llvm_config_cmd.stdout.read().decode(locale.getdefaultlocale()[1])
 llvm_config_output_list = llvm_config_output.split("\n")
 
 if re.search(r'DEBUG', llvm_config_output_list[0]):

Modified: lld/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.site.cfg.in?rev=204773&r1=204772&r2=204773&view=diff
==============================================================================
--- lld/trunk/test/lit.site.cfg.in (original)
+++ lld/trunk/test/lit.site.cfg.in Tue Mar 25 19:53:48 2014
@@ -14,7 +14,7 @@ config.python_executable = "@PYTHON_EXEC
 try:
     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:
+except KeyError as e:
     key, = e.args
     lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
 





More information about the llvm-commits mailing list