summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2013-08-07 21:43:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2013-08-07 21:43:23 +0000
commitbd9bb2c515173a2d9fa8f8472e06a753618c0c7a (patch)
treea9bf932b44afaadf54a09f7002a490e095fc9682 /utils
parenta1ba7527ded837e4c98149f7b1fe848a93177e07 (diff)
downloadllvm-bd9bb2c515173a2d9fa8f8472e06a753618c0c7a.tar.gz
llvm-bd9bb2c515173a2d9fa8f8472e06a753618c0c7a.tar.bz2
llvm-bd9bb2c515173a2d9fa8f8472e06a753618c0c7a.tar.xz
[lit] Avoid comparisons with None.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/lit/lit/TestRunner.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/lit/lit/TestRunner.py b/utils/lit/lit/TestRunner.py
index 1beb92c1d1..9fe9eb9d94 100644
--- a/utils/lit/lit/TestRunner.py
+++ b/utils/lit/lit/TestRunner.py
@@ -224,7 +224,9 @@ def executeShCmd(cmd, cfg, cwd, results):
results.append((cmd.commands[i], out, err, res))
if cmd.pipe_err:
# Python treats the exit code as a signed char.
- if res < 0:
+ if exitCode is None:
+ exitCode = res
+ elif res < 0:
exitCode = min(exitCode, res)
else:
exitCode = max(exitCode, res)