[test-suite] r265071 - lit: Fix python3 compatibility
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 16:09:41 PDT 2016
Author: matze
Date: Thu Mar 31 18:09:40 2016
New Revision: 265071
URL: http://llvm.org/viewvc/llvm-project?rev=265071&view=rev
Log:
lit: Fix python3 compatibility
Modified:
test-suite/trunk/litsupport/codesize.py
test-suite/trunk/litsupport/compiletime.py
test-suite/trunk/litsupport/hash.py
test-suite/trunk/litsupport/perf.py
test-suite/trunk/litsupport/profilegen.py
test-suite/trunk/litsupport/remote.py
test-suite/trunk/litsupport/run_under.py
test-suite/trunk/litsupport/test.py
test-suite/trunk/litsupport/testplan.py
test-suite/trunk/litsupport/timeit.py
Modified: test-suite/trunk/litsupport/codesize.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/codesize.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/codesize.py (original)
+++ test-suite/trunk/litsupport/codesize.py Thu Mar 31 18:09:40 2016
@@ -1,7 +1,7 @@
+from litsupport import testplan
import lit.Test
import logging
import os.path
-import testplan
def _getCodeSize(context):
@@ -15,7 +15,7 @@ def _getCodeSize(context):
if llvm_size:
# -format=sysv is easier to parse than darwin/berkeley.
cmdline = [llvm_size, '-format=sysv', context.executable]
- out = testplan.check_output(cmdline)
+ out = testplan.check_output(cmdline).decode('utf-8', errors='ignore')
lines = out.splitlines()
# First line contains executable name, second line should be a
# "section size addr" header, numbers start after that.
Modified: test-suite/trunk/litsupport/compiletime.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/compiletime.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/compiletime.py (original)
+++ test-suite/trunk/litsupport/compiletime.py Thu Mar 31 18:09:40 2016
@@ -1,6 +1,6 @@
import lit.Test
+from litsupport import timeit
import os
-import timeit
def _getCompileTime(context):
Modified: test-suite/trunk/litsupport/hash.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/hash.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/hash.py (original)
+++ test-suite/trunk/litsupport/hash.py Thu Mar 31 18:09:40 2016
@@ -1,10 +1,10 @@
from lit.Test import toMetricValue
-import lit.Test
+from litsupport import shellcommand
+from litsupport import testplan
import hashlib
+import lit.Test
import logging
-import testplan
import platform
-import shellcommand
def compute(context):
Modified: test-suite/trunk/litsupport/perf.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/perf.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/perf.py (original)
+++ test-suite/trunk/litsupport/perf.py Thu Mar 31 18:09:40 2016
@@ -1,6 +1,6 @@
-import shellcommand
-import testplan
-import run_under
+from litsupport import shellcommand
+from litsupport import testplan
+from litsupport import run_under
def mutateCommandLine(context, commandline):
Modified: test-suite/trunk/litsupport/profilegen.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/profilegen.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/profilegen.py (original)
+++ test-suite/trunk/litsupport/profilegen.py Thu Mar 31 18:09:40 2016
@@ -1,5 +1,5 @@
-import shellcommand
-import testplan
+from litsupport import shellcommand
+from litsupport import testplan
def mutateCommandline(context, commandline):
Modified: test-suite/trunk/litsupport/remote.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/remote.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/remote.py (original)
+++ test-suite/trunk/litsupport/remote.py Thu Mar 31 18:09:40 2016
@@ -1,5 +1,5 @@
+from litsupport import testplan
import logging
-import testplan
def mutateCommandline(context, commandline):
Modified: test-suite/trunk/litsupport/run_under.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/run_under.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/run_under.py (original)
+++ test-suite/trunk/litsupport/run_under.py Thu Mar 31 18:09:40 2016
@@ -1,5 +1,5 @@
-import shellcommand
-import testplan
+from litsupport import shellcommand
+from litsupport import testplan
def mutateCommandLine(context, commandline):
Modified: test-suite/trunk/litsupport/test.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/test.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/test.py (original)
+++ test-suite/trunk/litsupport/test.py Thu Mar 31 18:09:40 2016
@@ -8,16 +8,16 @@ from lit.TestRunner import getDefaultSub
from lit import Test
from lit.util import to_bytes, to_string
-import codesize
-import compiletime
-import hash
-import perf
-import profilegen
-import remote
-import run_under
-import shellcommand
-import testplan
-import timeit
+from litsupport import codesize
+from litsupport import compiletime
+from litsupport import hash
+from litsupport import perf
+from litsupport import profilegen
+from litsupport import remote
+from litsupport import run_under
+from litsupport import shellcommand
+from litsupport import testplan
+from litsupport import timeit
SKIPPED = lit.Test.ResultCode('SKIPPED', False)
Modified: test-suite/trunk/litsupport/testplan.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/testplan.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/testplan.py (original)
+++ test-suite/trunk/litsupport/testplan.py Thu Mar 31 18:09:40 2016
@@ -2,11 +2,11 @@
Datastructures for test plans; Parsing of .test files; Executing test plans.
"""
from lit.TestRunner import parseIntegratedTestScriptCommands
+from litsupport import shellcommand
import lit.Test
import lit.TestRunner
import logging
import os
-import shellcommand
import subprocess
Modified: test-suite/trunk/litsupport/timeit.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/timeit.py?rev=265071&r1=265070&r2=265071&view=diff
==============================================================================
--- test-suite/trunk/litsupport/timeit.py (original)
+++ test-suite/trunk/litsupport/timeit.py Thu Mar 31 18:09:40 2016
@@ -1,7 +1,7 @@
+from litsupport import shellcommand
+from litsupport import testplan
import lit.Test
import re
-import shellcommand
-import testplan
def mutateCommandLine(context, commandline):
More information about the llvm-commits
mailing list