diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-04 00:12:31 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-04 00:12:31 +0000 |
commit | e1e5746476745cfea4051324c89836bc4b581530 (patch) | |
tree | eb4865497d22ab5846f1005487e1e7475d9a1ef6 /utils/lit | |
parent | 67b453b0d1ed7ab42a9408a6eb00131e160eb421 (diff) | |
download | external_llvm-e1e5746476745cfea4051324c89836bc4b581530.zip external_llvm-e1e5746476745cfea4051324c89836bc4b581530.tar.gz external_llvm-e1e5746476745cfea4051324c89836bc4b581530.tar.bz2 |
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!".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/TestRunner.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py index e0c2962..aae16f6 100644 --- a/utils/lit/lit/TestRunner.py +++ b/utils/lit/lit/TestRunner.py @@ -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: |