[tests] Make string encoding issues explicit.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 7 Aug 2013 23:09:24 +0000 (23:09 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 7 Aug 2013 23:09:24 +0000 (23:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187929 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg

index c018674f9b43820812dc87cd309725d1bc1f7f38..dc08c679ca3a922b8c937642f79023b967aa36bd 100644 (file)
@@ -283,11 +283,11 @@ import subprocess
 try:
     llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
                            stdout = subprocess.PIPE)
-except OSError, why:
-    print "Could not find llc in " + llvm_tools_dir
+except OSError:
+    print("Could not find llc in " + llvm_tools_dir)
     exit(42)
 
-if re.search(r'with assertions', llc_cmd.stdout.read()):
+if re.search(r'with assertions', llc_cmd.stdout.read().decode('ascii')):
     config.available_features.add('asserts')
 llc_cmd.wait()