summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-04 00:05:16 +0000
committerDan Gohman <gohman@apple.com>2010-08-04 00:05:16 +0000
commit8a7ffe651f706a6819e94e6a99bbb2c1bb1d4391 (patch)
tree3706badff2fe686e2868c5c5a3025ebeb5b2d9e6 /utils
parente1390c40a6135b5caa4b0f6db1c3375dcffd4d05 (diff)
downloadllvm-8a7ffe651f706a6819e94e6a99bbb2c1bb1d4391.tar.gz
llvm-8a7ffe651f706a6819e94e6a99bbb2c1bb1d4391.tar.bz2
llvm-8a7ffe651f706a6819e94e6a99bbb2c1bb1d4391.tar.xz
Don't print "Command output (stdout):" when the command has no output,
and same for stderr, to avoid clutter in the output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110169 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/lit/lit/TestRunner.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
index f653245b22..e0c2962d22 100644
--- a/utils/lit/lit/TestRunner.py
+++ b/utils/lit/lit/TestRunner.py
@@ -487,14 +487,16 @@ def formatTestOutput(status, out, err, exitCode, script):
print >>output, '\n'.join(script)
print >>output, "--"
print >>output, "Exit Code: %r" % exitCode
- print >>output, "Command Output (stdout):"
- print >>output, "--"
- output.write(out)
- print >>output, "--"
- print >>output, "Command Output (stderr):"
- print >>output, "--"
- output.write(err)
- print >>output, "--"
+ if out:
+ print >>output, "Command Output (stdout):"
+ print >>output, "--"
+ output.write(out)
+ print >>output, "--"
+ if err:
+ print >>output, "Command Output (stderr):"
+ print >>output, "--"
+ output.write(err)
+ print >>output, "--"
return (status, output.getvalue())
def executeTclTest(test, litConfig):