Change the logic which interprets output on stderr as an error so that

it doesn't modify the exit code or the stdout contents, and so that it
doesn't clutter the output with "Command has output on stderr!".

llvm-svn: 110171
This commit is contained in:
Dan Gohman 2010-08-04 00:12:31 +00:00
parent 79daf7e0ae
commit 4f9c40c521
1 changed files with 4 additions and 12 deletions

View File

@ -312,11 +312,6 @@ def executeTclScriptInternal(test, litConfig, tmpBase, commands, cwd):
out,err,exitCode = executeCommand(command, cwd=cwd,
env=test.config.environment)
# Tcl commands fail on standard error output.
if err:
exitCode = 1
out = 'Command has output on stderr!\n\n' + out
return out,err,exitCode
else:
results = []
@ -328,11 +323,6 @@ def executeTclScriptInternal(test, litConfig, tmpBase, commands, cwd):
out = err = ''
# Tcl commands fail on standard error output.
if [True for _,_,err,res in results if err]:
exitCode = 1
out += 'Command has output on stderr!\n\n'
for i,(cmd, cmd_out, cmd_err, res) in enumerate(results):
out += 'Command %d: %s\n' % (i, ' '.join('"%s"' % s for s in cmd.args))
out += 'Command %d Result: %r\n' % (i, res)
@ -521,12 +511,14 @@ def executeTclTest(test, litConfig):
if len(res) == 2:
return res
# Test for failure. In addition to the exit code, Tcl commands fail
# if there is any standard error output.
out,err,exitCode = res
if isXFail:
ok = exitCode != 0
ok = exitCode != 0 or err
status = Test.XFAIL if ok else Test.XPASS
else:
ok = exitCode == 0
ok = exitCode == 0 and not err
status = Test.PASS if ok else Test.FAIL
if ok: