[llvm] r272052 - [lit] Fix an uninitialized var on Windows.
Daniel Dunbar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 13:14:17 PDT 2016
Author: ddunbar
Date: Tue Jun 7 15:14:17 2016
New Revision: 272052
URL: http://llvm.org/viewvc/llvm-project?rev=272052&view=rev
Log:
[lit] Fix an uninitialized var on Windows.
Modified:
llvm/trunk/utils/lit/lit/TestRunner.py
Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=272052&r1=272051&r2=272052&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Tue Jun 7 15:14:17 2016
@@ -255,6 +255,7 @@ def _executeShCmd(cmd, shenv, results, t
result = subprocess.PIPE
else:
if r[2] is None:
+ redir_filename = None
if kAvoidDevNull and r[0] == '/dev/null':
r[2] = tempfile.TemporaryFile(mode=r[1])
elif kIsWindows and r[0] == '/dev/tty':
@@ -398,7 +399,7 @@ def _executeShCmd(cmd, shenv, results, t
# Gather the redirected output files.
output_files = []
for (name, mode, f, path) in sorted(opened_files):
- if mode in ('w', 'a'):
+ if path is not None and mode in ('w', 'a'):
try:
with open(path) as f:
data = f.read()
More information about the llvm-commits
mailing list