[lit] Fix bug when using Python3 where a failing test would not show
[oota-llvm.git] / utils / lit / lit / TestRunner.py
index 19e2514f7c0df21ff4e8a3b0376294c2e359d43a..37e0dd35340d3e01e7453a3bd4acec6feb4759aa 100644 (file)
@@ -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