llvm.org GIT mirror llvm / 2e02d2b
Fix some lit test ResourceWarnings on Windows When running LLDB lit tests on Windows, the system selects a debug version of Python, which was issuing lots of ResourceWarnings about files that weren't closed. There are two kinds of them, and each test triggered one of each. This patch fixes one kind by ensuring TestRunner explicitly close the temporary files created for routing stderr. This is important on Windows but has no net effect on Posix systems. The remaining ResourceWarnings are more elusive; the bug may lie in the Python library subprocess.py, and it may be Windows-specific. Differential Revision: https://reviews.llvm.org/D63102 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363700 91177308-0d34-0410-b5e6-96231b3b80d8 Adrian McCarthy 27 days ago
1 changed file(s) with 1 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
990990 for i,f in stderrTempFiles:
991991 f.seek(0, 0)
992992 procData[i] = (procData[i][0], f.read())
993 f.close()
993994
994995 exitCode = None
995996 for i,(out,err) in enumerate(procData):