Commit 35a5b603 authored by rwbarton's avatar rwbarton Committed by Ben Gamari

testsuite driver: don't append to existing output files

If you happen to have a file lying aroud (probably
from before the move to running tests in temporary subdirectories)
it gets symlinked into the directory since its name starts
with T1234; and then program output gets appended to the existing
file (through the symlink). We should open the file for writing
instead, to replace the symlink with a new file.

Test Plan: tested locally, + harbormaster

Reviewers: austin, Phyx, bgamari

Reviewed By: Phyx, bgamari

Subscribers: thomie

Differential Revision:
parent c2bd62ed
......@@ -1801,11 +1801,11 @@ def runCmd(cmd, stdin=None, stdout=None, stderr=None, timeout_multiplier=1.0, pr
if stdout:
with, 'ab') as f:
with, 'wb') as f:
if stderr:
if stderr is not subprocess.STDOUT:
with, 'ab') as f:
with, 'wb') as f:
if r.returncode == 98:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment