[lit] Avoid comparisons with None.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 7 Aug 2013 21:43:23 +0000 (21:43 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 7 Aug 2013 21:43:23 +0000 (21:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187919 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/lit/TestRunner.py

index 1beb92c1d1e54e10480d66241919fc3c706a2811..9fe9eb9d947cfc38699e812f580739149febf48f 100644 (file)
@@ -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)