diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py index 19e2514f7c0..37e0dd35340 100644 --- a/utils/lit/lit/TestRunner.py +++ b/utils/lit/lit/TestRunner.py @@ -469,7 +469,9 @@ def applySubstitutions(script, substitutions): # Strip the trailing newline and any extra whitespace. return ln.strip() - return map(processLine, script) + # Note Python 3 map() gives an iterator rather than a list so explicitly + # convert to list before returning. + return list(map(processLine, script)) def parseIntegratedTestScript(test, require_script=True): """parseIntegratedTestScript - Scan an LLVM/Clang style integrated test