From dedae84dd3b7649db4b08402250357c153b89bcd Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 8 Nov 2009 03:43:06 +0000 Subject: [PATCH] lit: Workaround a Win32/subprocess bug when appending. llvm-svn: 86437 --- utils/lit/TestRunner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/lit/TestRunner.py b/utils/lit/TestRunner.py index bee1167f6af..7abc60a1f00 100644 --- a/utils/lit/TestRunner.py +++ b/utils/lit/TestRunner.py @@ -112,6 +112,9 @@ def executeShCmd(cmd, cfg, cwd, results): r[2] = tempfile.TemporaryFile(mode=r[1]) else: r[2] = open(r[0], r[1]) + # Workaround a Win32 and/or subprocess bug when appending. + if r[1] == 'a': + r[2].seek(0, os.SEEK_END) result = r[2] final_redirects.append(result)