summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-04 00:00:13 +0000
committerDan Gohman <gohman@apple.com>2010-08-04 00:00:13 +0000
commitc70c6b144ae4b68ace52dd8fc35adc40bd0cc68b (patch)
treed1a44051f8c7358c1673fb47ee5987977ab3f0e9 /llvm/utils
parentfc419ef6a07fe6591c8f30acb1f1fe7091a311c9 (diff)
downloadbcm5719-llvm-c70c6b144ae4b68ace52dd8fc35adc40bd0cc68b.tar.gz
bcm5719-llvm-c70c6b144ae4b68ace52dd8fc35adc40bd0cc68b.zip
Use the regular conditional operator syntax instead of a clever hack.
llvm-svn: 110168
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/lit/lit/TestRunner.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py
index 3c2fe384739..f653245b22e 100644
--- a/llvm/utils/lit/lit/TestRunner.py
+++ b/llvm/utils/lit/lit/TestRunner.py
@@ -522,10 +522,10 @@ def executeTclTest(test, litConfig):
out,err,exitCode = res
if isXFail:
ok = exitCode != 0
- status = (Test.XPASS, Test.XFAIL)[ok]
+ status = Test.XFAIL if ok else Test.XPASS
else:
ok = exitCode == 0
- status = (Test.FAIL, Test.PASS)[ok]
+ status = Test.PASS if ok else Test.FAIL
if ok:
return (status,'')
@@ -558,10 +558,10 @@ def executeShTest(test, litConfig, useExternalSh):
out,err,exitCode = res
if isXFail:
ok = exitCode != 0
- status = (Test.XPASS, Test.XFAIL)[ok]
+ status = Test.XFAIL if ok else Test.XPASS
else:
ok = exitCode == 0
- status = (Test.FAIL, Test.PASS)[ok]
+ status = Test.PASS if ok else Test.FAIL
if ok:
return (status,'')
OpenPOWER on IntegriCloud